294294
295295--- Returns the root node of this section of the DOM tree
296296---
297- --- In components, this will return a the <template> tag that the component runs
298- --- inside, otherwise, it will return the <nml> tag
297+ --- In components, this will return a the ` <template>` tag that the component runs
298+ --- inside, otherwise, it will return the ` <nml>` tag
299299--- @return Banana.Ast The root node
300300function M .Ast :getRootNode ()
301301 if self ._parent :isNil () then
360360--- Sets the nodelist of this ast to be equivalent to the NML string provided.
361361---
362362--- note: due to a limitation of the current nml parser, the entire string MUST
363- --- be contained inside a single element (eg setInnerNml('<span>asdf <span> idk </span></span>')
364- --- is allowed but setInnerNml('asdf <span> idk </span>') is not)
363+ --- be contained inside a single element (eg ` setInnerNml('<span>asdf <span> idk </span></span>')`
364+ --- is allowed but ` setInnerNml('asdf <span> idk </span>')` is not)
365365--- @param nml string The nml string to set this ast ' s content to
366366function M .Ast :setInnerNml (nml )
367367 local ast , styleRules , preScripts , postScripts = require (" banana.require" )
@@ -1910,7 +1910,7 @@ end
19101910
19111911--- Returns the printed text value of this element (does not include newlines)
19121912---
1913- --- Note: This is currently bugged as entities (eg &) and attr substitutions
1913+ --- Note: This is currently bugged as entities (eg ` &` ) and attr substitutions
19141914--- (eg %attr) will not return their printed value
19151915--- @return string
19161916function M .Ast :getTextContent ()
@@ -1928,8 +1928,8 @@ end
19281928
19291929--- Sets the text content of this element. Removes all other children
19301930---
1931- --- Replaces newlines with <br> elements (note: if newlines are passed inside an
1932- --- inline element (eg. <span>), it will cause a LineTooBig error)
1931+ --- Replaces newlines with ` <br>` elements (note: if newlines are passed inside an
1932+ --- inline element (eg. ` <span>` ), it will cause a LineTooBig error)
19331933--- @param str string the text to set this element ' s content to
19341934function M .Ast :setTextContent (str )
19351935 if type (str ) ~= " string" then
0 commit comments