Commit Graph
6 Commits
Author SHA1 Message Date
Albert Krewinkel 73ce302479 Harmonize maintainer email addresses in module headers. 2024-07-08 13:27:45 +02:00
John MacFarlane 03630a2c6e Update copyright dates to 2024. 2024-04-25 18:16:49 -07:00
Albert Krewinkel b55cd83a60 Update copyright years, it's 2023! 2023-01-10 20:28:27 +01:00
John MacFarlane 063480accd T.P.Scripting: Refactor the scripting engine.
The new type CustomComponents is exported from T.P.Scripting, and the
ScriptEngine fields are changed. Instead of separate fields for custom
readers and writers, we now have a single function that loads any number
of "components" from a script: these may be custom readers, custom
writers, templates for writers, or extension configs. (Note: it's
possible to have a custom reader and a custom writer for a format
together in the same file.)

Pandoc now checks the folder `custom` in the user's data directory for a
matching script if it can't find one in the local directory. Previously,
the `readers` and `writers` data directories were search for custom
readers and writers, respectively. Scripts in those directories must be
moved to the `custom` folder.

Custom readers used to implement a fallback behavior that allowed to
consume just a string value as input to the `Reader` function. This has
been removed, the first argument is now always a list of sources. Use
`tostring` on that argument to get a string.

Closes #8417.

Signed-off-by: Albert Krewinkel <albert@zeitkraut.de>
2022-12-20 20:58:44 -08:00
Albert Krewinkel 253d2e768a Lua: support extensions in custom readers.
Like custom readers, like writers, can define the set of supported
extensions by setting a global. E.g.:

``` lua
reader_extensions = {
  smart = true,
  citations = false,
}
```
2022-10-12 11:58:18 +02:00
Albert Krewinkel a5ffaaa413 Lua: support custom bytestring readers. 2022-10-10 11:27:42 +02:00