pandoc/test/lua/block-count.lua
Albert Krewinkel 41baaff327
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
2017-08-22 23:30:48 +02:00

11 lines
179 B
Lua

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