Pandoc already depends on `crypton-conntection`, and thus transitively
on `crypton`. The latter provides a vast variety of hashing algorithms
and makes the dependency on SHA unnecessary.
The `Doc` values produced and handled by the `pandoc.layout` module can
now be styled using `bold`, `italic`, `underlined`, or `strikeout`. The
style is ignored in normal rendering, but becomes visible when rendering
to ANSI output. The `pandoc.layout.render` function now takes a third
parameter that defines the output style, either *plain* or *ansi*.
The module now comes with a method `:at(index[, def])` that allows to access
indices, accepts negative indices to count from the end, and will return the
`def` value as a default if the list has no item at the given position.
Furthermore, the list constructor `pandoc.List` now accepts iterators. E.g.,
`pandoc.List(text:gmatch '%S+')` returns the list of words in `text`.
Closes: #9835
This fixes counterintuitive behavior of the `content` property on
BulletList and OrderedList items. Unmarshalling of that field now
matches the behavior of the constructor.
Fixes: #8916
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'
```
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.
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.
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.