From f2f6851713674545e2f303b95589cbaff8e6a6b9 Mon Sep 17 00:00:00 2001 From: Albert Krewinkel Date: Mon, 20 Mar 2017 15:17:03 +0100 Subject: 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. --- pandoc.cabal | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'pandoc.cabal') diff --git a/pandoc.cabal b/pandoc.cabal index 68722dfac..a05543445 100644 --- a/pandoc.cabal +++ b/pandoc.cabal @@ -104,6 +104,8 @@ Data-Files: data/abbreviations -- sample lua custom writer data/sample.lua + -- pandoc lua module + data/pandoc.lua -- bash completion template data/bash_completion.tpl -- documentation @@ -232,6 +234,7 @@ Extra-Source-Files: test/odt/odt/*.odt test/odt/markdown/*.md test/odt/native/*.native + test/lua/strmacro.lua Source-repository head type: git location: git://github.com/jgm/pandoc.git @@ -282,6 +285,7 @@ Library pandoc-types >= 1.17 && < 1.18, aeson >= 0.7 && < 1.2, aeson-pretty >= 0.8 && < 0.9, + hslua-aeson >= 0.1.0.2 && < 1, tagsoup >= 0.13.7 && < 0.15, base64-bytestring >= 0.1 && < 1.1, zlib >= 0.5 && < 0.7, @@ -396,6 +400,7 @@ Library Text.Pandoc.Writers.Muse, Text.Pandoc.Writers.Math, Text.Pandoc.Writers.Shared, + Text.Pandoc.Lua, Text.Pandoc.PDF, Text.Pandoc.UTF8, Text.Pandoc.Templates, @@ -434,6 +439,7 @@ Library Text.Pandoc.Readers.Org.ParserState, Text.Pandoc.Readers.Org.Parsing, Text.Pandoc.Readers.Org.Shared, + Text.Pandoc.Lua.PandocModule, Text.Pandoc.CSS, Text.Pandoc.UUID, Text.Pandoc.Slides, @@ -522,6 +528,7 @@ Test-Suite test-pandoc Other-Modules: Tests.Old Tests.Command Tests.Helpers + Tests.Lua Tests.Shared Tests.Readers.LaTeX Tests.Readers.HTML -- cgit v1.2.3