aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Lua/Filter.hs
AgeCommit message (Collapse)AuthorFilesLines
2019-08-16Lua: improve function documentationsAlbert Krewinkel1-1/+4
2019-08-16Lua: traverse nested blocks and inlines in correct orderAlbert Krewinkel1-9/+21
Traversal methods are updated to use the new Walk module such that sequences with nested Inline (or Block) elements are traversed in the order in which they appear in the linearized document. Fixes: #5667
2019-07-02Fix redundant constraint warnings. (#5625)Pete Ryland1-1/+1
2019-03-01Remove license boilerplate.John MacFarlane1-18/+0
The haddock module header contains essentially the same information, so the boilerplate is redundant and just one more thing to get out of sync.
2019-02-16T.P.Lua: split StackInstances into smaller Marshaling modulesAlbert Krewinkel1-1/+1
2019-02-04Add missing copyright notices and remove license boilerplate (#5112)Albert Krewinkel1-4/+4
Quite a few modules were missing copyright notices. This commit adds copyright notices everywhere via haddock module headers. The old license boilerplate comment is redundant with this and has been removed. Update copyright years to 2019. Closes #4592.
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.