mirror of
https://github.com/jgm/pandoc.git
synced 2026-08-25 01:36:45 +00:00
Text.Pandoc.Lua: support Inline and Block catch-alls
Try function `Inline`/`Block` if no other filter function of the respective type matches an element. Closes: #3859
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
local num_blocks = 0
|
||||
|
||||
function Block(el)
|
||||
num_blocks = num_blocks + 1
|
||||
end
|
||||
|
||||
function Pandoc(blocks, meta)
|
||||
return pandoc.Pandoc {
|
||||
pandoc.Para{pandoc.Str(num_blocks)}
|
||||
}
|
||||
end
|
||||
Reference in New Issue
Block a user