-
With a Lua filter, I'm trying to traverse documents and an external YAML meta data file in The head of the AST of my documet looks like this:
However, adding the function function Meta (n)
return n, false
end takes no effect. In other words, the filter is applied to children of Is it possible to exclude the entire |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Indeed, looking at the code it seems that this is not implemented for Meta elements. Feel free to raise a bug. My approach would be to place the filter in a table, and then use local my_filter = {
traverse = 'topdown',
Str = function (s)
-- ...
end
}
function Pandoc(doc)
doc.blocks = doc.blocks:walk(my_filter)
return doc
end |
Beta Was this translation helpful? Give feedback.
Indeed, looking at the code it seems that this is not implemented for Meta elements. Feel free to raise a bug.
My approach would be to place the filter in a table, and then use
walk
to apply the filter on the document body: