aboutsummaryrefslogtreecommitdiff
path: root/pandoc-lua-engine/src/Text/Pandoc/Lua/Module/Pandoc.hs
AgeCommit message (Collapse)Author
2026-01-08Lua: switch to HsLua 2.5Albert Krewinkel
2026-01-05Lua: let `pandoc.with_state` error on unknown optionsAlbert Krewinkel
Unknown or unsupported options now cause the `pandoc.with_state` function to fail. Closes: #11376
2026-01-02Lua: add function `pandoc.with_state`Albert Krewinkel
The function allows to run a callback with a modified pandoc state. This provides the ability to temporarily modify the resource path, the user data directory, and the HTTP request headers. Closes: #10859
2025-12-31Lua: mark readers and writers with their types.Albert Krewinkel
The `pandoc.readers` and `pandoc.writers` maps now have string values instead of boolean values. The string signals the type of the reader/writer, `"text"` for *TextReader*/*TextWriter* and `"bytestring"` for *ByteStringReader*/*ByteStringWriter*. Closes: #11367
2025-05-28doc/lua-filters.md: add missing docs for `pandoc.Caption`Albert Krewinkel
2025-05-14Lua: accept filename-contents pairs as env for `pandoc.read`Albert Krewinkel
Key-value pairs, mapping from filename to contents, can be used to fill the ersatz file system used in the reader sandbox.
2025-05-14Lua: allow to pass files to the `pandoc.read` sandboxAlbert Krewinkel
The sandbox is now enabled if the fourth parameter is a list of files. The files are read and then made available in the sandbox via a mock file system.
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
2024-12-10Lua: add `Caption` constructor to `pandoc` module.Albert Krewinkel
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-04-25Update copyright dates to 2024.John MacFarlane
2024-01-29Lua: catch encoding error in `pandoc.read`Albert Krewinkel
Fixed a bug that could lead to an un-catchable error and program termination when `pandoc.read` was called with invalid UTF-8 input. Fixes: #9385
2023-03-13Switch to hslua-2.3Albert Krewinkel
2023-01-10Update copyright years, it's 2023!Albert Krewinkel
2022-12-16Lua: allow table structure as format spec.Albert Krewinkel
This allows to pass structured values as format specifiers to `pandoc.write` and `pandoc.read`.
2022-10-27Lua: allow strings in place of compiled templates.Albert Krewinkel
This allows to use a string as parameter to `pandoc.template.apply` and in the WriterOptions `template` field. Closes: #8321
2022-10-20T.P.Lua.Module.Pandoc: Remove `pushModule`.John MacFarlane
This is not used and is not an exported function; it's dead code. @tarleb if there is some reason to keep this here, please feel free to revert this.
2022-10-08[API Change] Change argument type of `getReader`, `getWriter`.Albert Krewinkel
The functions now take a `FlavoredFormat` instead of a text argument.
2022-10-08[API Change] Add new module "Text.Pandoc.Format"Albert Krewinkel
The module provides functions and types for format spec parsing and processing. The function `parseFormatSpec` was moved from Text.Pandoc.Extensions to the new module and renamed to `parseFlavoredFormat`. It now operates in a PandocMonad and is based on the updated types.
2022-10-03Lua: add function `pandoc.write_classic`.Albert Krewinkel
The function can be used to convert a classic writer into a new-style writer by setting it as the value of `Writer`: ``` lua Writer = pandoc.write_classic ``` or to fully restore the old behavior: ``` lua function Writer (doc, opts) PANDOC_DOCUMENT = doc PANDOC_WRITER_OPTIONS = opts load(PANDOC_SCRIPT_FILE)() return pandoc.write_classic(doc, opts) end ```
2022-09-30[API Change] Extract Lua code into new package pandoc-lua-engineAlbert Krewinkel
The flag 'lua53` must now be used with that package if pandoc is to be compiled against Lua 5.3.