(or equivalent, e.g. 'i'). This brings the markdown
parser in line with commonmark, and avoids a lot of
unintended list starts. Closes#11735.
Note that ordered lists that are not sublists may
still start with numbers other than 1.
'make pandoc.wasm' will compile a wasm version of pandoc.
This also adds a 'repl' flag to pandoc-lua-engine, so that
support for a Lua repl can be disabled for the wasm build.
A new wasm directory contains:
- pandoc.js, a JavaScript wrapper for pandoc.wasm
- index.html + index.js, a web app exposing all of pandoc's
functionality in a GUI interface
- a set of illustrative examples that can be loaded from the web app
Most of the code in index.html and index.js has been produced in
interaction with Claude code.
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
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
The common state is transferred to Lua when calling a custom Lua reader,
and is now also transferred back after the reader has finished. This
ensures that info messages, warnings, and mediabag entries are available
to the main program and all subsequent processing steps.
A new command line option `--syntax-highlighting` is provided; it takes
the values `none`, `default`, `idiomatic`, a style name, or a path to a
theme file. It replaces the `--no-highlighting`, `--highlighting-style`,
and `--listings` options.
The `writerListings` and `writerHighlightStyle` fields of the
`WriterOptions` type are replaced with `writerHighlightStyle`.
Closes: #10525
The function generates element identifiers based on inlines content.
It's primary use case is the programmatic generation of ID, similar to
what the `auto_identifiers` extension provides for many formats.
Org mode makes a distinction between smart parsing of quotes, and smart
parsing of special strings like `...`. The finer grained control over
these features is necessary to truthfully reproduce Emacs Org mode
behavior. Special strings are enabled by default, while smart quotes are
disabled.
The behavior of `special_string` is brought closer to the reference
implementation in that `\-` is now treated as a soft hyphen.
- The `PANDOC_STATE` is no longer a userdata object, but a table that
behaves like the old object.
- Log messages in `PANDOC_STATE.log` are now in temporal order.
This function performs a normalization of Pandoc documents. E.g.,
multiple successive spaces are collapsed, and tables are normalized such
that all rows and columns contain the same number of cells.
Closes: #10356
Functions that expect UTF-8-encoded filenames should make it easier to
write platform-independent scripts, as the encoding of the actual
filename depends on the system.
Additionally, this also adds a generalized method to run commands, and
functions to retrieve XDG directory names.
The new functions are `command`, `copy`, `read_file`, `remove`,
`rename`, `times`, `write_file`, `xdg`.
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.
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