summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--data/pandoc.lua7
1 files changed, 6 insertions, 1 deletions
diff --git a/data/pandoc.lua b/data/pandoc.lua
index 138d8b59b..a7e381435 100644
--- a/data/pandoc.lua
+++ b/data/pandoc.lua
@@ -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