aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Lua/Module
AgeCommit message (Collapse)AuthorFilesLines
2019-05-04Lua: add `pandoc.system` module (#5468)Albert Krewinkel1-0/+34
The `system` Lua module provides utility functions to interact with the operating- and file system. E.g. print(pandoc.system.get_current_directory()) or pandoc.system.with_temporary_directory('tikz', function (dir) -- write and compile a TikZ file with pdflatex end)
2019-03-01Remove license boilerplate.John MacFarlane3-51/+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 Krewinkel3-3/+3
2019-02-16T.P.Lua: get CommonState from Lua globalAlbert Krewinkel1-25/+41
This allows more control over the common state from within Lua scripts.
2019-02-04Add missing copyright notices and remove license boilerplate (#5112)Albert Krewinkel3-6/+6
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-11-19Lua filters: test AST object equality via HaskellAlbert Krewinkel1-3/+15
Equality of Lua objects representing pandoc AST elements is tested by unmarshalling the objects and comparing the result in Haskell. A new function `equals` which performs this test has been added to the `pandoc.utils` module. Closes: #5092
2018-11-17Lua Utils module: improve stringifyAlbert Krewinkel1-2/+9
Meta value strings (MetaString) and booleans (MetaBool) are now converted to the literal string and the lowercase boolean name, respectively. Previously, all values of these types were converted to the empty string.
2018-09-24Use hslua v1.0.0Albert Krewinkel3-27/+27
2018-08-12Lua: cleanup Lua utils, remove unused functions.Albert Krewinkel1-4/+5
2018-07-30Lua Utils module: add function blocks_to_inlines (#4799)Albert Krewinkel1-0/+10
Exposes a function converting which flattenes a list of blocks into a list of inlines. An example use case would be the conversion of Note elements into other inlines.
2018-03-18Use NoImplicitPrelude and explicitly import Prelude.John MacFarlane3-0/+6
This seems to be necessary if we are to use our custom Prelude with ghci. Closes #4464.
2018-01-23Lua filters: store constructors in registryAlbert Krewinkel1-1/+1
Lua functions used to construct AST element values are stored in the Lua registry for quicker access. Getting a value from the registry is much faster than getting a global value (partly to idiosyncrasies of hslua); this change results in a considerable performance boost.
2018-01-15Renaming: Json -> JSON in modules and functions.John MacFarlane1-5/+5
2018-01-13Lua modules: add function pandoc.utils.run_json_filterAlbert Krewinkel1-3/+26
Runs a JSON filter on a Pandoc document.
2018-01-05Update copyright notices to include 2018Albert Krewinkel3-6/+6
2018-01-04Use hslua utils where possibleAlbert Krewinkel3-17/+16
Some helper functions and types have been moved to hslua. Change: minor
2018-01-01Lua.Module.Utils: make stringify work on MetaValues.John MacFarlane1-1/+4
I'm sure this was intended in the first place, but currently only Meta is supported.
2017-12-23Lua modules: add function pandoc.utils.hierarchicalizeAlbert Krewinkel1-7/+12
Convert list of Pandoc blocks into (hierarchical) list of Elements.
2017-12-23Lua modules: add function pandoc.utils.normalize_dateAlbert Krewinkel1-2/+10
The function parses a date and converts it (if possible) to "YYYY-MM-DD" format.
2017-12-23Lua modules: add function pandoc.utils.to_roman_numeralAlbert Krewinkel1-1/+9
The function allows conversion of numbers below 4000 into roman numerals.
2017-12-22Lua modules: add stringify function to pandoc.utilsAlbert Krewinkel1-6/+35
The new function `pandoc.utils.stringify` converts any AST element to a string with formatting removed.
2017-12-21Lua modules: added pandoc.utils moduleAlbert Krewinkel2-8/+50
A new module `pandoc.utils` has been created. It holds utility functions like `sha1`, which was moved from the main `pandoc` module.
2017-12-21Lua modules: make a Haskell module for each Lua moduleAlbert Krewinkel2-72/+110
Definitions for the `pandoc.mediabag` modules are moved to a separate Haskell module. Change: minor
2017-12-21Lua modules: move to dedicated submoduleAlbert Krewinkel1-0/+213
The Haskell module defining the Lua `pandoc` module is moved to Text.Pandoc.Lua.Module.Pandoc. Change: minor