| Age | Commit message (Collapse) | Author |
|
Invalid input bytes in error messages caused pandoc to crash with an
encoding exception. Instead, the invalid bytes are now replaced with the
Unicode replacement character U+FFFD.
|
|
- Bump pandoc-lua-engine to 0.2.1.3.
- Bump pandoc-server to 0.1.0.5.
|
|
|
|
+ When the optional base level parameter is provided, we no
longer ensure that the sequence of heading levels is gapless
[behavior change]. Instead, we set the lowest heading level to
the specified base level, and adjust the others accordingly. If
an author wants to skip a level, e.g. from level 1 to level 3,
they can do that. In general, the heading levels specified
in the source document are preserved; `makeSections` only
puts them into a hierarchical structure. Closes #9398.
+ Section numbers are now assigned so that the top level
gets `1`, no matter what heading level is used. So, even
if the top heading level is 2, numbers will be `1`, `2`, etc.
rather than `0.1`, `0.2`, as in the past. Closes #5071.
+ We revert to the old behavior when the `--number-offset` option
is used. So, for example, if a document begins with a level-3
heading, and `--number-offset=1,2` is used, the top-level section
numbers will be `1.2.1`, `1.2.2`, etc. This is mainly for
backwards-compatibility.
|
|
|
|
Fixed a bug that could lead to an un-catchable error and program
termination when `pandoc.read` was called with invalid UTF-8 input.
Fixes: #9385
|
|
The CommonState (`PANDOC_STATE` in Lua) may change between the time that
a custom writer script is first loaded and when the writer is run.
However, the writer was always using the initial state, which led to
problems, e.g. when the mediabag was updated in a filter, as those
updates where not visible to the writer.
The state is now updated right before the writer function runs.
Fixes: #9229
|
|
Closes: #9107
|
|
See #9046.
|
|
|
|
|
|
|
|
|
|
|
|
Lua's warning system is plugged into pandoc's reporting architecture.
Warnings that are raised with the Lua `warn` function are now reported
together with other messages.
|
|
|
|
Should fix the following error when running tests from Hackage tarball:
```
pandoc.mediabag: [WARNING] Could not fetch resource lua/module/sample.svg: replacing image with description
FAIL
fetch // populates media bag:
File lua/module/sample.svg not found in resource path
DEBUG:root:haskell-pandoc-lua-engine:
fill // populates media bag:
lua/module/pandoc-mediabag.lua:70:
expected values to be equal, got 'nil' and 'image/svg+xml'
```
|
|
The value did not hold the actual file path for scripts in the *custom*
folder of the datadir.
Fixes: #8781
|
|
|
|
|
|
* T.P.Format: export `formatFromFilePaths` [API change]
* Lua: add function `pandoc.format.from_path`
* Update lua-filters.md
* The old T.P.App.FormatHeuristics module has been removed.
This is an alternative to #8693.
|
|
|
|
|
|
Ensures that objects with nested AST elements can be encoded as JSON.
|
|
This only affects the name in the Lua-internal documentation. It is
still possible to load the modules via `require 'text'`, although this
is deprecated.
|
|
The documentation in the Haskell sources has been updated.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
A metatable used during initialization was not properly removed from the
stack. Likewise, accessing the CommonState from Lua previously led to
the pollution of the Lua stack with a left-over value.
|
|
|
|
|
|
The function returns the CPU time consumed by pandoc and can be used to
benchmark Lua computations.
|
|
Closes: #8605
|
|
All major AST elements now have `__tojson` metamethods that return the
JSON representation of an element. This allows to JSON-encode these
elements with libraries that respect the `__tojson` metamethod,
including dkjson.
|
|
|
|
|
|
The PathTemplate type exported from Text.Pandoc.Chunks is now an
instance of the ToJSON and FromJSON classes.
Closes: #8607
|
|
|
|
Otherwise sections are always numbered in the TOC,
even if `--number-sections` is not used.
|
|
This simplifies the creation of custom readers and writers that are
based on built-in formats.
|
|
Allows to write the complete mediabag or just a specific file to a given
directory.
|
|
+ Re-use `toTocTree` in constructing `chunkedTOC`.
Previously we used an entirely different function toTOCTree'.
+ Improve `tocToList` so that it avoids empty lists of
items that are omitted because they are below the toc depth.
pandoc-lua-engine:
+ Fix structure tests in light of last change.
T.P.Writers.ChunkedHTML:
+ Reuse `tocToList` in `buildTOC`.
T.P.Writers.EPUB:
+ Adjust EPUB writer for Chunks changes.
|
|
Adds support for table of contents and chunks handling. The function
`make_sections` has been given a friendlier interface and was moved to
the new module; the old `pandoc.utils.make_sections` has been
deprecated.
|
|
It has been removed from pandoc-types.
|
|
|