pandoc/test/lua/strmacro.lua
Albert Krewinkel 2761a38e53
Lua filter: use destructured functions for inline filters
Instead of taking the whole inline element, forcing users to destructure it
themselves, the components of the elements are passed to the filtering
functions.
2017-04-12 20:48:44 +02:00

11 lines
198 B
Lua

return {
{
Str = function (str)
if str == "{{helloworld}}" then
return pandoc.Emph {pandoc.Str "Hello, World"}
else
return pandoc.Str(str)
end
end,
}
}