pandoc 2.13
Click to expand changelog
-
Support
yaml_metadata_block
extension forcommonmark
,gfm
(#6537). This support is a bit more limited than with pandoc’smarkdown
. The YAML block must be the first thing in the input, and the leaf notes are parsed in isolation from the rest of the document. So, for example, you can’t use reference links if the references are defined later in the document. -
Fix fallback to default partials when custom templates are used. If the directory containing a template does not contain the partial, it should be sought in the default templates, but this was not working properly (#7164).
-
Handle
nocite
better with--biblatex
and--natbib
(#4585). Previously the nocite metadata field was ignored with these formats. Now it populates anocite-ids
template variable and causes a\nocite
command to be issued. -
Text.Pandoc.Citeproc: apply
fixLinks
correctly (#7130). This is code that incorporates a prefix likehttps://doi.org/
into a following link when appropriate. -
Text.Pandoc.Shared:
- Remove
backslashEscapes
,escapeStringUsing
[API change]. Replace these inefficient association list lookups with more efficient escaping functions in the writers that used them (for a 10-25% performance boost in org, haddock, rtf, texinfo writers). - Remove
ToString
,ToText
typeclasses [API change]. These were needed for the transition from String to Text, but they are no longer used and may clash with other things. - Simplify
compactDL
.
- Remove
-
Text.Pandoc.Parsing:
- Change type of
readWithM
so that it is no longer polymorphic [API change]. TheToText
class has been removed, and now that we’ve completed the transition to Text we no longer need this to operate on Strings. - Remove
F
type synonym [API change]. Muse and Org were defining their ownF
anyway.
- Change type of
-
Text.Pandoc.Readers.Metadata:
- Export
yamlMetaBlock
[API change]. - Make
yamlBsToMeta
,yamlBsToRefs
polymorphic on the parser state [API change].
- Export
-
Markdown reader: Fix regression with
tex_math_backslash
(#7155). -
MediaWiki reader: Allow block-level content in notes (ref) (#7145).
-
Jira reader (Albert Krewinkel):
- Fixed parsing of autolinks (i.e., of bare URLs in the text). Previously an autolink would take up the rest of a line, as spaces were allowed characters in these items.
- Emoji character sequences no longer cause parsing failures. This was due to missing backtracking when emoji parsing fails.
- Mark divs created from panels with class “panel”.
-
RST reader: fix logic for ending comments (#7134). Previously comments sometimes got extended too far.
-
DocBook writer: include Header attributes as XML attributes on section (Erik Rask). Attributes with key names that are not allowed as XML attributes are dropped, as are attributes with invalid values and
xml:id
(DocBook 5) andid
(DocBook 4). -
Docx writer:
- Make
nsid
inabstractNum
deterministic. Previously we assigned a random number, but we don’t need random values, so now we just assign a value based on the list marker. - Use integral values for
w:tblW
(#7141).
- Make
-
Jira writer (Albert Krewinkel):
- Block quotes are only rendered as
bq.
if they do not contain a linebreak. - Jira writer: improve div/panel handling. Include div attributes in panels, always render divs with class
panel
as panels, and avoid nesting of panels.
- Block quotes are only rendered as
-
HTML writer: Add warnings on duplicate attribute values. This prevents emitting invalid HTML. Ultimately it would be good to prevent this in the types themselves, but this is better for now.
-
Org writer: Prevent unintended creation of ordered list items (#7132, Albert Krewinkel). Adjust line wrapping if default wrapping would cause a line to be read as an ordered list item.
-
JATS templates: support ‘equal-contrib’ attrib for authors (Albert Krewinkel). Authors who contributed equally to a paper may be marked with
equal-contrib
. -
reveal.js template: replace JS comment with HTML (#7154, Florian Kohrt).
-
Text.Pandoc.Logging: Add
DuplicateAttribute
constructor toLogMessage
. [API change] -
Use
-j4
for linux release build. This speeds up the build dramatically on arm. -
cabal.project: remove ghcoptions. Move flags to top level, so they can be set differently on the command line.
-
Require latest texmath, skylighting, citeproc, jira-wiki-markup. (The latest skylighting fixes a bad bug with Haskell syntax highlighting.) Narrow version bounds for texmath, skylighting, and citeproc, since the test output depend on them.
-
Use doclayout 0.3.0.2. This significantly reduces the time and memory needed to compile pandoc.
-
Use
foldl'
instead offoldl
everywhere. -
Update bounds for random (#7156, Alexey Kuleshevich).
-
Remove uses of some partial functions.
-
Don’t bake in a larger stack size for the executable.
-
Test improvements:
- Use
getExecutablePath
from base, avoiding the dependency onexecutable-path
. - Factor out
setupEnvironment
in Helpers, to avoid code duplication. - Fix finding of data files by setting teh
pandoc_datadir
environment variable when we shell out to pandoc. This avoids the need to use--data-dir
for the tests, which caused problems findingpandoc.lua
when compiling without theembed_data_files
flag (#7163).
- Use
-
Benchmark improvements:
- Build
+RTS -A8m -RTS
into default ghc-options for benchmark. This is necessary to get accurate benchmark results; otherwise we are largely measuring garbage collecting, some not related to the current benchmark. - Allow specifying BASELINE file in ‘make bench’ for comparison (otherwise the latest benchmark is chosen by default).
- Force
readFile
in benchmarks early (Bodigrim).
- Build
-
CONTRIBUTING: suggest using a
cabal.project.local
file (#7153, Albert Krewinkel). -
Add ghcid-test to Makefile. This loads the test suite in ghcid.