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:
Albert Krewinkel 2017-08-21 16:47:05 +02:00
parent d70b89c0d9
commit b81cff4357
No known key found for this signature in database
GPG key ID: 388DC0B21F631124

View file

@ -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