aboutsummaryrefslogtreecommitdiff
path: root/test/lua/plain-to-para.lua
diff options
context:
space:
mode:
authorAlbert Krewinkel <albert+github@zeitkraut.de>2017-03-20 15:17:03 +0100
committerJohn MacFarlane <jgm@berkeley.edu>2017-03-20 15:17:03 +0100
commitf2f6851713674545e2f303b95589cbaff8e6a6b9 (patch)
treea3b65213bb63aece6b0ae3726394abb153b1c7fd /test/lua/plain-to-para.lua
parentb010a8c5e7ba4969100fe078f0f9a1a6cdaf7c5c (diff)
downloadpandoc-f2f6851713674545e2f303b95589cbaff8e6a6b9.tar.gz
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.
Diffstat (limited to 'test/lua/plain-to-para.lua')
-rw-r--r--test/lua/plain-to-para.lua6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/lua/plain-to-para.lua b/test/lua/plain-to-para.lua
new file mode 100644
index 000000000..747257411
--- /dev/null
+++ b/test/lua/plain-to-para.lua
@@ -0,0 +1,6 @@
+return {
+ { Plain = function (blk)
+ return pandoc.Para(blk.c)
+ end,
+ }
+}