Lua filters (#3514)

* Add `--lua-filter` option.  This works like `--filter` but takes pathnames of special lua filters and uses the lua interpreter baked into pandoc, so that no external interpreter is needed.  Note that lua filters are all applied after regular filters, regardless of their position on the command line.
* Add Text.Pandoc.Lua, exporting `runLuaFilter`.  Add `pandoc.lua` to data files.
* Add private module Text.Pandoc.Lua.PandocModule to supply the default lua module.
* Add Tests.Lua to tests.
* Add data/pandoc.lua, the lua module pandoc imports when processing its lua filters.
* Document in MANUAL.txt.
This commit is contained in:
Albert Krewinkel
2017-03-20 15:17:03 +01:00
committed by John MacFarlane
parent b010a8c5e7
commit f2f6851713
13 changed files with 528 additions and 1 deletions
+10
View File
@@ -0,0 +1,10 @@
return {
{ Str = function (inline)
if inline.c == "{{helloworld}}" then
return pandoc.Emph {pandoc.Str "Hello, World"}
else
return inline
end
end,
}
}