mirror of
https://github.com/jgm/pandoc.git
synced 2026-08-29 01:41:20 +08:00
Lua docs: fix typos, missing links
This commit is contained in:
@@ -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
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user