Age | Commit message (Collapse) | Author | Files | Lines |
|
Custom writers have access to the global variable `PANDOC_DOCUMENT`. The
variable contains a userdata wrapper around the full pandoc AST and
exposes two fields, `meta` and `blocks`. The field content is only
marshaled on-demand, performance of scripts not accessing the fields
remains unaffected.
|
|
Custom writers can specify an optional `Setup` function. The function
takes the full Pandoc document as input and should not return any value.
Users can use this function to configure the writer depending on the
given document's content or its metadata.
data/sample.lua: add sample use of Setup function.
The change allows to control the image format used to encode the image
produced from dot code.
Closes #4957
|
|
|
|
Each definition list item contains just a single key and the associated
value. Using `next` to get the key/value pair is more idiomatic than
iterating over the single-element table.
|
|
|
|
This reverts commit 0e3736422ee97a5cfedc255705f566a319f954f9
in favor of @tarleb's fix.
|
|
Closes #4202.
|
|
|
|
* Fix for "pandoc: user error (Incorrect result type (string expected, got nil))." when the source format contains Raw data.
* Update sample.lua
|
|
|
|
Closes #2985.
|
|
Closes #2697.
|
|
Added threefold wrapping option.
* Command line option: deprecated `--no-wrap`, added
`--wrap=[auto|none|preserve]`
* Added WrapOption, exported from Text.Pandoc.Options
* Changed type of writerWrapText in WriterOptions from
Bool to WrapOption.
* Modified Text.Pandoc.Shared functions for SoftBreak.
* Supported SoftBreak in writers.
* Updated tests.
* Updated README.
Closes #1701.
|
|
Cloess #2393.
|
|
Removed HTML header scaffolding from data/sample.lua.
|
|
|
|
|
|
Currently these are "transparent" containers, except in HTML,
where they produce div and span elements with attributes.
|
|
|
|
|
|
pandoc -t data/sample.lua
will load the script sample.lua and use it as a custom writer.
data/sample.lua is provided as an example.
Added `--print-custom-lua-writer` option to print the sample
script.
|