aboutsummaryrefslogtreecommitdiff
path: root/pandoc-lua-engine/src/Text
diff options
context:
space:
mode:
authorAlbert Krewinkel <[email protected]>2024-05-04 22:06:26 +0200
committerAlbert Krewinkel <[email protected]>2024-05-04 22:17:01 +0200
commitc45f163b4d6ee64faf2c10a1bc58f89f0ff2f174 (patch)
tree227090ce9c1a51df3a24e129b7b459c2c3774098 /pandoc-lua-engine/src/Text
parent6000a1739469b644e5ba8905c631063bed99c5f7 (diff)
Lua: fix generated docs.
Update and fix docs for `pandoc.types.Version` and `pandoc.utils.type`.
Diffstat (limited to 'pandoc-lua-engine/src/Text')
-rw-r--r--pandoc-lua-engine/src/Text/Pandoc/Lua/Module/Types.hs12
-rw-r--r--pandoc-lua-engine/src/Text/Pandoc/Lua/Module/Utils.hs2
2 files changed, 8 insertions, 6 deletions
diff --git a/pandoc-lua-engine/src/Text/Pandoc/Lua/Module/Types.hs b/pandoc-lua-engine/src/Text/Pandoc/Lua/Module/Types.hs
index 1b0e69580..014add31b 100644
--- a/pandoc-lua-engine/src/Text/Pandoc/Lua/Module/Types.hs
+++ b/pandoc-lua-engine/src/Text/Pandoc/Lua/Module/Types.hs
@@ -30,14 +30,14 @@ documentedModule = Module
, moduleFunctions =
[ defun "Version"
### return
- <#> parameter peekVersionFuzzy "string|integer|{integer,...}|Version"
+ <#> parameter peekVersionFuzzy "string|number|{integer,...}|Version"
"version_specifier"
- (mconcat [ "either a version string like `'2.7.3'`, "
- , "a single integer like `2`, "
- , "list of integers like `{2,7,3}`, "
- , "or a Version object"
+ (mconcat [ "A version string like `'2.7.3'`, "
+ , "a Lua number like `2.0`, "
+ , "a list of integers like `{2,7,3}`, "
+ , "or a Version object."
])
- =#> functionResult pushVersion "Version" "A new Version object."
+ =#> functionResult pushVersion "Version" "New Version object."
`since` makeVersion [2,7,3]
]
, moduleOperations = []
diff --git a/pandoc-lua-engine/src/Text/Pandoc/Lua/Module/Utils.hs b/pandoc-lua-engine/src/Text/Pandoc/Lua/Module/Utils.hs
index 7ebd125d4..5fddf6e8b 100644
--- a/pandoc-lua-engine/src/Text/Pandoc/Lua/Module/Utils.hs
+++ b/pandoc-lua-engine/src/Text/Pandoc/Lua/Module/Utils.hs
@@ -369,10 +369,12 @@ type' = defun "type"
, "function."
, ""
, "Usage:"
+ , ""
, " -- Prints one of 'string', 'boolean', 'Inlines', 'Blocks',"
, " -- 'table', and 'nil', corresponding to the Haskell constructors"
, " -- MetaString, MetaBool, MetaInlines, MetaBlocks, MetaMap,"
, " -- and an unset value, respectively."
+ , ""
, " function Meta (meta)"
, " print('type of metavalue `author`:', pandoc.utils.type(meta.author))"
, " end"