data/pandoc.lua: Include Pandoc, Meta in implicit filters
Functions with a name that corresponds to an AST element are included in implicit pandoc filter, but both `Meta` and `Pandoc` were wrongly ignored till now.
This commit is contained in:
parent
d70b89c0d9
commit
b81cff4357
1 changed files with 6 additions and 1 deletions
|
@ -804,8 +804,13 @@ end
|
|||
-- -- return {{Str = Str}}
|
||||
function M.global_filter()
|
||||
local res = {}
|
||||
function is_filter_function(k)
|
||||
return M.Inline.constructor[k] or
|
||||
M.Block.constructor[k] or
|
||||
k == "Meta" or k == "Doc" or k == "Pandoc"
|
||||
end
|
||||
for k, v in pairs(_G) do
|
||||
if M.Inline.constructor[k] or M.Block.constructor[k] or k == "Doc" then
|
||||
if is_filter_function(k) then
|
||||
res[k] = v
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue