aboutsummaryrefslogtreecommitdiff
path: root/tools/update-lua-module-docs.lua
diff options
context:
space:
mode:
Diffstat (limited to 'tools/update-lua-module-docs.lua')
-rw-r--r--tools/update-lua-module-docs.lua7
1 files changed, 6 insertions, 1 deletions
diff --git a/tools/update-lua-module-docs.lua b/tools/update-lua-module-docs.lua
index 8d21d958e..9528e4663 100644
--- a/tools/update-lua-module-docs.lua
+++ b/tools/update-lua-module-docs.lua
@@ -44,10 +44,15 @@ local function render_results (results)
return {BulletList(
List(results):map(
function (res)
+ -- Types starting with a capital letter are pandoc types, so we can
+ -- link them.
+ local type_ = res.type:match'^[A-Z]'
+ and Link(res.type, '#type-' .. res.type:lower())
+ or Str(res.type)
return Para(
read_inlines(res.description)
.. {Space()}
- .. Inlines('(' .. res.type .. ')')
+ .. Inlines '(' .. Inlines{type_} .. Inlines ')'
)
end
)