diff options
| author | Albert Krewinkel <[email protected]> | 2022-02-07 08:34:21 +0100 |
|---|---|---|
| committer | Albert Krewinkel <[email protected]> | 2022-02-07 09:30:12 +0100 |
| commit | 7d3db1dd2dd466718d1261003e65f9ddc4065f48 (patch) | |
| tree | a4cb7ca23c1431f925b386cbbe3e1bce2fea8c60 /tools/update-lua-module-docs.lua | |
| parent | 2b3433404ebdf5bd8c4a4030965ca7cda74e4c29 (diff) | |
Lua docs: fix typos, missing links
Diffstat (limited to 'tools/update-lua-module-docs.lua')
| -rw-r--r-- | tools/update-lua-module-docs.lua | 7 |
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 ) |
