Lua filter: revert to non-destructuring filters

We want to provide an interface familiar to users of other filtering
libraries.
This commit is contained in:
Albert Krewinkel
2017-04-15 21:40:48 +02:00
parent 291e4f39e8
commit e6a536befc
5 changed files with 58 additions and 77 deletions
+3 -3
View File
@@ -1,10 +1,10 @@
return {
{
Str = function (str)
if str == "{{helloworld}}" then
Str = function (elem)
if elem.text == "{{helloworld}}" then
return pandoc.Emph {pandoc.Str "Hello, World"}
else
return pandoc.Str(str)
return elem
end
end,
}