Lua filter: use destructured functions for block filters

Filtering functions take element components as arguments instead of the
whole block elements. This resembles the way elements are handled in
custom writers.
This commit is contained in:
Albert Krewinkel
2017-04-14 11:34:44 +02:00
parent 0516b5127c
commit 07f41a5515
3 changed files with 26 additions and 21 deletions
+1 -2
View File
@@ -1,7 +1,6 @@
return {
{
RawBlock = function (blk)
local format, content = unpack(blk.c)
RawBlock = function (format, content)
if format == "markdown" then
return pandoc.reader.markdown.read_block(content)
else