Commit Graph

8 Commits

Author SHA1 Message Date
Albert Krewinkel d399943759 Lua: Remove prefixes from Lua type names
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-14 07:53:12 +02:00
Albert Krewinkel 9af5b1ca8b Lua: add function pandoc.template.get.
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 <cagix@hsbi.de>
2024-06-08 08:42:47 -07:00
Albert Krewinkel 999916642c Fix test for template marshaling. 2022-10-27 22:46:34 +02:00
Albert Krewinkel 6c4d885bda Lua: allow strings in place of compiled templates.
This allows to use a string as parameter to `pandoc.template.apply` and
in the WriterOptions `template` field.

Closes: #8321
2022-10-27 22:09:39 +02:00
Albert Krewinkel 78d7fc46fe Lua: add function pandoc.template.apply
The new function applies a context, containing variable assignments, to
a template.
2022-10-11 14:03:08 -07:00
Albert Krewinkel 96bdd34a90 Lua: fix tests on Windows broken in previous commit. 2022-10-05 22:07:38 +02:00
Albert Krewinkel 48ab7a17cf Lua: produce more informative error messages for pandoc errors
Errors are reported in Lua in the same words in which they would be
reported in the terminal.
2022-10-05 21:53:03 +02:00
Albert Krewinkel 5be9052f5f [API Change] Extract Lua code into new package pandoc-lua-engine
The flag 'lua53` must now be used with that package if pandoc is to be
compiled against Lua 5.3.
2022-09-30 08:33:40 -07:00