aboutsummaryrefslogtreecommitdiff
path: root/pandoc-lua-engine
AgeCommit message (Collapse)Author
2025-05-13pandoc-lua-engine: add all test files to the cabal fileAlbert Krewinkel
2025-05-13Lua: support sandboxed parsing with `pandoc.read`.Albert Krewinkel
The function `pandoc.read` is now taking an optional fourth parameter that specifies the environment in which the parser will be run. Passing the string `sandbox` as the argument causes the reader to run in a sandbox, thereby preventing all access to the network and file system. Closes: #10831
2025-05-12Use citeproc-0.9. Bump citeproc bounds for pandoc, pandoc-lua-engine.John MacFarlane
2025-03-16pandoc-lua-engine to 0.4.1.1, allow latest containersJohn MacFarlane
2024-12-23pandoc-lua-engine: bump to 0.4.1.John MacFarlane
2024-12-10Lua: support more elements as input to `pandoc.utils.stringify`.Albert Krewinkel
Elements of type Caption, Cell, TableHead, and TableFoot can now be stringified. Fixes: #10450
2024-12-10Lua: add `Caption` constructor to `pandoc` module.Albert Krewinkel
2024-12-07Depend on typst 0.6.1John MacFarlane
2024-12-07Depend on released pandoc-lua-marshal 0.3.0.John MacFarlane
2024-12-07Bump pandoc-lua-engine to 0.4 and depend on it in pandoc-cli.John MacFarlane
2024-11-06Fix typos (#10349)Andreas Deininger
2024-10-28Bump upper bound for data-default.John MacFarlane
2024-10-14Lua: Remove prefixes from Lua type namesAlbert Krewinkel
Lua type names were inconsistent with regard to the use of prefixes; all prefixes are removed now, and Lua types now have the same name as the Haskell types. The use of app-specific prefixes is suggested by the Lua manual to avoid collisions. However, this shouldn't be a problem with pandoc, as it cannot be used as a Lua package. Closes: #8574
2024-10-05Depend on latest pandoc-lua-marshall.John MacFarlane
2024-10-05Bump pandoc-lua-engine to 0.3.3.John MacFarlane
2024-10-01doc/lua-filters.md: list functions in `pandoc.utils` alphabeticallyAlbert Krewinkel
2024-10-01Lua: allow returning a single filter from filter filesAlbert Krewinkel
It is now possible to return a single filter from a filter file, e.g. ``` lua -- Switch single- and double quotes return { Quoted = function (q) elem.quotetype = elem.quotetype == 'SingleQuote' and 'DoubleQuote' or 'SingleQuote' return elem end } The filter must not contain numerical indexes, or it might be treated as a list of filters.
2024-09-29Stop depending on package SHAAlbert Krewinkel
Pandoc already depends on `crypton-conntection`, and thus transitively on `crypton`. The latter provides a vast variety of hashing algorithms and makes the dependency on SHA unnecessary.
2024-09-22Add support for list of figures (lof) and list of tables (lot) (#10029)Akash Patel
Two new command-line options are added: `--lof[=true|false]`, `--list-of-figures[=true|false]` `--lot[=true|false]`, `--list-of-tables[=true|false]` Only docx, latex, and context are supported at this point. Setting the `lof` and `lot` variables will also work for the formats that are currently supported. [API changes] + Lua: `list_of_figures` and `list_of_tables` can now be used in writer options. + Text.Pandoc.Options: add `writerListOfFigures` and `writerListOfTables` fields to `WriterOptions`. + Text.Pandoc.App.Opt: add `optListOfFigures` and `optListOfTables` to `Opt`. Closes #8245. Co-authored-by: John MacFarlane <[email protected]>
2024-09-21Lua: support character styling via `pandoc.layout`Albert Krewinkel
The `Doc` values produced and handled by the `pandoc.layout` module can now be styled using `bold`, `italic`, `underlined`, or `strikeout`. The style is ignored in normal rendering, but becomes visible when rendering to ANSI output. The `pandoc.layout.render` function now takes a third parameter that defines the output style, either *plain* or *ansi*.
2024-09-21Lua: update List moduleAlbert Krewinkel
The module now comes with a method `:at(index[, def])` that allows to access indices, accepts negative indices to count from the end, and will return the `def` value as a default if the list has no item at the given position. Furthermore, the list constructor `pandoc.List` now accepts iterators. E.g., `pandoc.List(text:gmatch '%S+')` returns the list of words in `text`. Closes: #9835
2024-09-09Bump pandoc-lua-engine to 0.3.2.John MacFarlane
2024-09-09Depend on doclayout 0.5.John MacFarlane
2024-09-08pandoc-lua-engine: marshall list_tables, epub_title_page writer options.John MacFarlane
2024-09-08Finishing touches on `--link-images`:John MacFarlane
- Document in defaults file section of MANUAL. - Add to pandoc-lua-engine writer option marshalling. - Add to pandoc-server initialization of writer options.
2024-09-08Include accessors for new writer optionsJohn MacFarlane
2024-07-28Bump pandoc version in pandoc-lua-engine.John MacFarlane
2024-07-28Bump pandoc-lua-engine version to 0.3.1, depend on it in pandoc-cliJohn MacFarlane
2024-07-08lua-filters.md: Partially autogenerate docs for module "pandoc"Albert Krewinkel
The documentation system isn't powerful enough to generate the full documentation automatically.
2024-07-08Harmonize maintainer email addresses in module headers.Albert Krewinkel
2024-06-28Lua: keep `lpeg` and `re` as "loaded" modules.Albert Krewinkel
The modules `lpeg` and `re` are now treated as if they had been loaded with `require`. Previously the modules were only assigned to global values, but could be loaded again via `require`, thereby allowing to use a system-wide installation. However, this proved to be confusing. The old behavior can be restored by adding the following lines to the top of Lua scripts, or to the `init.lua` in the data dir. debug.registry()['_LOADED'].lpeg = nil debug.registry()['_LOADED'].re = nil
2024-06-24Bump pandoc version bound in pandoc-lua-engine.John MacFarlane
2024-06-24Update pandoc-lua-engine to 0.3John MacFarlane
2024-06-09Lua: split Init module into more modules.Albert Krewinkel
The module has grown unwieldy and is therefore split into three internal Haskell modules, `Init`, `Module`, and `Run`.
2024-06-08Lua: add function `pandoc.template.get`.Albert Krewinkel
The function allows to specify a template with the same argument value that would be used with the `--template` command line parameter. Closes: #9854 Co-authored-by: Carsten Gips <[email protected]>
2024-06-08Update more copyright dates to 2024.Albert Krewinkel
2024-06-08Lua: keep CommonState object in the registryAlbert Krewinkel
The state is an internal value and should be treated as such. The `PANDOC_STATE` global is merely a copy; unsetting the global no longer breaks the Lua engine.
2024-06-08Lua: add tests for PANDOC_STATE globalAlbert Krewinkel
2024-06-07doc/lua-filters: autogenerate docs for module pandoc.templateAlbert Krewinkel
2024-06-07Lua: allow passing an environment to `run_lua_filter`.Albert Krewinkel
The default is now to use a *copy* of the global environment when running a filter; this ensures better separation when `run_lua_filter` is used multiple times. A custom environment can be specified via the optional third parameter.
2024-06-01Lua: Set `pandoc.List` as default metatable for JSON listsAlbert Krewinkel
Lists created by `pandoc.json.decode` now behave like lists generated via `pandoc.List`. This also ensures that `pandoc.List` tables are encoded as JSON arrays when passed to `pandoc.json.encode`. Fixes: #9834
2024-05-28Lua: fix typo in `run_lua_filter`Albert Krewinkel
Fixes previous commit ad68ff34aeb78e26d98a593dfdaf6bc4933857fc.
2024-05-27Lua: add function `pandoc.utils.run_lua_filter` (#9803)Albert Krewinkel
2024-05-13pandoc-lua-engine: depend on pandoc >= 3.2.John MacFarlane
See https://github.com/jgm/pandoc/issues/9755
2024-05-11Bump pandoc, pandoc-cli to 3.2, update changelog.John MacFarlane
Also bump pandoc-lua-engine to 0.2.1.5 and allow pandoc 3.2.
2024-05-10Lua: add a `pandoc.log` module.Albert Krewinkel
2024-05-06Lua: update to pandoc-lua-marshal version 0.2.7.Albert Krewinkel
This fixes counterintuitive behavior of the `content` property on BulletList and OrderedList items. Unmarshalling of that field now matches the behavior of the constructor. Fixes: #8916
2024-05-05Lua: use hslua-module-zip-1.1.3 to fix the windows buildAlbert Krewinkel
2024-05-05Lua: use newest zip module.Albert Krewinkel
This adds a `symlink` function to Entry objects, allowing to check if an entry represents a symbolic link.
2024-05-05Lua: improve `pandoc.json.decode` docs.Albert Krewinkel