Skip to content

Commit c1fe3b5

Browse files
committed
doc: fixes to generation
1 parent 855a9ff commit c1fe3b5

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

lua/banana/nml/ast.lua

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -294,8 +294,8 @@ end
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
300300
function M.Ast:getRootNode()
301301
if self._parent:isNil() then
@@ -360,8 +360,8 @@ end
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
366366
function 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 &amp;) and attr substitutions
1913+
---Note: This is currently bugged as entities (eg `&amp;`) and attr substitutions
19141914
---(eg %attr) will not return their printed value
19151915
---@return string
19161916
function 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
19341934
function M.Ast:setTextContent(str)
19351935
if type(str) ~= "string" then

lua/banana/wikigen/gendoc.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ local function extractType(line)
8484
local contChars = {
8585
[":"] = true,
8686
[","] = true,
87+
["{"] = true,
8788
}
8889

8990
while contChars[word:sub(#word, #word)] do

0 commit comments

Comments
 (0)