aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Lua/Util.hs
AgeCommit message (Collapse)AuthorFilesLines
2018-01-12Lua filters: improve error messagesAlbert Krewinkel1-0/+9
Provide more context about the task which caused an error.
2018-01-05Update copyright notices to include 2018Albert Krewinkel1-4/+4
2018-01-04Use hslua utils where possibleAlbert Krewinkel1-16/+0
Some helper functions and types have been moved to hslua. Change: minor
2017-12-29data/pandoc.lua: drop function pandoc.global_filterAlbert Krewinkel1-0/+1
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-12-23Lua modules: add function pandoc.utils.normalize_dateAlbert Krewinkel1-0/+4
The function parses a date and converts it (if possible) to "YYYY-MM-DD" format.
2017-12-22Lua.Util: avoid altering the stack if peeking failsAlbert Krewinkel1-4/+12
The stack now remains unaltered if `getRawInt` or `getTable` fail. This is important when those functions are used in an operation that is part of an Alternative. Change: minor
2017-12-21Lua modules: move to dedicated submoduleAlbert Krewinkel1-2/+20
The Haskell module defining the Lua `pandoc` module is moved to Text.Pandoc.Lua.Module.Pandoc. Change: minor
2017-12-20Lua modules: turn pipe, read into full Haskell functionsAlbert Krewinkel1-3/+12
The `pipe` and `read` utility functions are converted from hybrid lua/haskell functions into full Haskell functions. This avoids the need for intermediate `_pipe`/`_read` helper functions, which have dropped.
2017-12-02Lua filters: refactor lua module handlingAlbert Krewinkel1-1/+32
The integration with Lua's package/module system is improved: A pandoc-specific package searcher is prepended to the searchers in `package.searchers`. The modules `pandoc` and `pandoc.mediabag` can now be loaded via `require`.
2017-10-27Automatic reformating by stylish-haskell.John MacFarlane1-2/+2
2017-10-26update years in copyrightKolen Cheung1-1/+1
2017-08-13Text.Pandoc.Lua: Optimize performance by using raw table accessAlbert Krewinkel1-11/+6
Raw table accessing functions never call back into haskell, which allows the compiler to use more aggressive optimizations. This improves lua filter performance considerably (⪆5% speedup).
2017-08-13Use hslua >= 0.7, update Lua codeAlbert Krewinkel1-63/+39
2017-06-03Improve code style in lua and org modulesAlbert Krewinkel1-4/+2
2017-05-13Update dates in copyright noticesAlbert Krewinkel1-1/+1
This follows the suggestions given by the FSF for GPL licensed software. <https://www.gnu.org/prep/maintain/html_node/Copyright-Notices.html>
2017-04-14Avoid repeating StackValue instances definitionsAlbert Krewinkel1-1/+55
The lua filters and custom lua writer system defined very similar StackValue instances for strings and tuples. These instance definitions are extracted to a separate module to enable sharing.
2017-04-14Extract lua helper functions into Lua.Util moduleAlbert Krewinkel1-0/+86