mirror of
https://github.com/jgm/pandoc.git
synced 2026-08-25 09:47:06 +00:00
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:
@@ -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,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user