aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Lua/Filter.hs
AgeCommit message (Collapse)AuthorFilesLines
2018-10-28T.P.Lua: expose more useful internals (API change)Albert Krewinkel1-0/+20
Newly exported from Text.Pandoc.Lua: - `runFilterFile` to run a Lua filter from file; - data type `Global` and its constructors; and - `setGlobals` to add globals to a Lua environment. This module also contains `Pushable` and `Peekable` instances required to get pandoc's data types to and from Lua. Low-level Lua operation remain hidden in Text.Pandoc.Lua.
2018-10-01Lua filters: report traceback when an error occursAlbert Krewinkel1-5/+4
A proper Lua traceback is added if either loading of a file or execution of a filter function fails. This should be of help to authors of Lua filters who need to debug their code.
2018-09-24Use hslua v1.0.0Albert Krewinkel1-15/+12
2018-09-19Lua filter: cleanup filter execution codeAlbert Krewinkel1-51/+73
2018-03-18Use NoImplicitPrelude and explicitly import Prelude.John MacFarlane1-0/+2
This seems to be necessary if we are to use our custom Prelude with ghci. Closes #4464.
2018-01-12Lua filters: improve error messagesAlbert Krewinkel1-2/+6
Provide more context about the task which caused an error.
2017-12-29data/pandoc.lua: drop function pandoc.global_filterAlbert Krewinkel1-2/+0
The function `global_filter` was used internally to get the implicitly defined global filter. It was of little value to end-users, but caused unnecessary code duplication in pandoc. The function has hence been dropped. Internally, the global filter is now received by interpreting the global table as lua filter. This is a Lua API change.
2017-11-11Functor instance to fix ghc 7.8 warning.John MacFarlane1-1/+1
2017-11-11Add lua filter functions to walk inline and block elements.John MacFarlane1-0/+168
Refactored some code from Text.Pandoc.Lua.PandocModule into new internal module Text.Pandoc.Lua.Filter. Add `walk_inline` and `walk_block` in pandoc lua module.