aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorAlbert Krewinkel <[email protected]>2022-02-05 10:56:59 +0100
committerJohn MacFarlane <[email protected]>2022-02-06 16:01:24 -0800
commit49f1e7608ead7a9bc0e73e99b24e47a9a8cf0400 (patch)
treeb12bb6e742e5d84b4a910848dc22234969c4fb3d /tools
parentae846381c33866a6c5646d82da455182bca4fcc5 (diff)
Lua: add module `pandoc.layout` to format and layout text
Diffstat (limited to 'tools')
-rw-r--r--tools/update-lua-module-docs.lua10
1 files changed, 6 insertions, 4 deletions
diff --git a/tools/update-lua-module-docs.lua b/tools/update-lua-module-docs.lua
index 2e32d3ea7..8d21d958e 100644
--- a/tools/update-lua-module-docs.lua
+++ b/tools/update-lua-module-docs.lua
@@ -76,9 +76,9 @@ local function render_function (doc, level, modulename)
Header(level, name, {id}),
Plain{Code(string.format('%s (%s)', name, args))},
} .. read_blocks(doc.description)
- .. List(#doc.parameters > 0 and {Header(level+1, 'Parameters')} or {})
+ .. List(#doc.parameters > 0 and {Para 'Parameters'} or {})
.. List{paramlist}
- .. List(#doc.results > 0 and {Header(level + 1, 'Returns')} or {})
+ .. List(#doc.results > 0 and {Para 'Returns'} or {})
.. render_results(doc.results)
end
@@ -106,7 +106,7 @@ local function render_module (doc)
return Blocks{
Header(1, Inlines('Module ' .. doc.name), {'module-' .. doc.name})
- } .. fields .. functions
+ } .. read_blocks(doc.description) .. fields .. functions
end
--- Retrieves the documentation object for the given value.
@@ -119,7 +119,9 @@ local function get_module_name(header)
end
--- Set of modules for which documentation should be generated.
-local handled_modules = {}
+local handled_modules = {
+ layout = true
+}
return {{
Pandoc = function (doc)