aboutsummaryrefslogtreecommitdiff
path: root/test/lua/strmacro.lua
diff options
context:
space:
mode:
authorAlbert Krewinkel <albert@zeitkraut.de>2017-04-15 21:40:48 +0200
committerAlbert Krewinkel <albert@zeitkraut.de>2017-04-15 21:40:48 +0200
commite6a536befcfd433aba66a3085e62792383867695 (patch)
treefa72e18815578651383fc79cffcce6edd76b324d /test/lua/strmacro.lua
parent291e4f39e8a118a723f2981f1eb731a061b0f6c0 (diff)
downloadpandoc-e6a536befcfd433aba66a3085e62792383867695.tar.gz
Lua filter: revert to non-destructuring filters
We want to provide an interface familiar to users of other filtering libraries.
Diffstat (limited to 'test/lua/strmacro.lua')
-rw-r--r--test/lua/strmacro.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/lua/strmacro.lua b/test/lua/strmacro.lua
index 40756a476..a2711798a 100644
--- a/test/lua/strmacro.lua
+++ b/test/lua/strmacro.lua
@@ -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,
}