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, 4 insertions, 3 deletions
diff --git a/tools/update-lua-module-docs.lua b/tools/update-lua-module-docs.lua
index 1491cc7dd..3f80ee28d 100644
--- a/tools/update-lua-module-docs.lua
+++ b/tools/update-lua-module-docs.lua
@@ -9,6 +9,7 @@
local ipairs, next, pairs, print, tostring, type, warn =
ipairs, next, pairs, print, tostring, type, warn
local string, table = string, table
+local pandoc = require 'pandoc'
local utils = require 'pandoc.utils'
local read, write = pandoc.read, pandoc.write
local Pandoc = pandoc.Pandoc
@@ -342,7 +343,7 @@ end
local function render_main_pandoc_module (doc)
local constants_section = Blocks{Header(2, "Constants")}
local fields = List{}
- for i, field in ipairs(doc.fields) do
+ for _, field in ipairs(doc.fields) do
if tostring(field.type) == 'string' then
constants_section:extend(render_field(field, 2, "pandoc"))
elseif field.name:match '^[A-Z]' then
@@ -410,8 +411,8 @@ function Reader (inputs)
local blocks = process_document(tostring(inputs), Blocks{}, 1)
blocks = blocks:walk {
Link = function (link)
- if link.title == 'wikilink' then
- link.title = ''
+ if link.classes == pandoc.List{'wikilink'} then
+ link.classes = {}
if known_types[link.target] then
link.target = '#' .. known_types[link.target]
else