7 Commits

Author SHA1 Message Date
Albert Krewinkel e0acb24528 Refactor highlighting options [API Change]
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
2025-09-02 17:50:47 +02:00
Albert Krewinkel 75aee7a23c Lua: use proper interface functions to access the CommonState.
- 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.
2025-08-01 10:04:14 -07:00
Albert Krewinkel 6a88abae3d Lua: keep CommonState object in the registry
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-08 14:39:58 +02:00
Albert Krewinkel d50bd30324 Lua: add tests for PANDOC_STATE global 2024-06-08 14:39:58 +02:00
Albert Krewinkel 9eee4a2582 Lua: add field chunk_template to WriterOptions objects [API change]
The PathTemplate type exported from Text.Pandoc.Chunks is now an
instance of the ToJSON and FromJSON classes.

Closes: #8607
2023-02-09 08:15:13 +01:00
John MacFarlane d7960212c0 Replace --epub-chapter-level with --split-level.
Rationale: we need this splitting level now not just in
EPUB but in chunked HTML.

`--epub-chapter-level` will still function as a deprecated
synonynm. `epub-chapter-level` will also continue to work in
defaults files, ande `epub_chapter_level` will still work for
Lua marshalling.

[API changes]

Text.Pandoc.App.Opt: remove `optEpubChapterLevel`, add
`optSplitLevel`.

Text.Pandoc.Options: remove `writerEpubChapterLevel`, add
`writerSplitLevel`.
2023-01-12 09:04:29 -08: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