diff options
author | Albert Krewinkel <albert@zeitkraut.de> | 2017-08-22 23:12:39 +0200 |
---|---|---|
committer | Albert Krewinkel <albert@zeitkraut.de> | 2017-08-22 23:30:48 +0200 |
commit | 41baaff32737e57dd9ec0a1153416ca24a12dca1 (patch) | |
tree | ca88cf3b4f2bbc08e2f0704d0a5b9c6bb6c07ff6 /test/lua | |
parent | 56fb854ad85dafff2016892bd6d2c5d24423bff0 (diff) | |
download | pandoc-41baaff32737e57dd9ec0a1153416ca24a12dca1.tar.gz |
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
Diffstat (limited to 'test/lua')
-rw-r--r-- | test/lua/block-count.lua | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/lua/block-count.lua b/test/lua/block-count.lua new file mode 100644 index 000000000..508b05ea8 --- /dev/null +++ b/test/lua/block-count.lua @@ -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 |