John MacFarlane
65a9d3a878
SelfContained: use application/octet-stream for unknown mime types...
...
instead of halting with an error.
Closes #7202 .
2021-04-05 08:49:03 -07:00
obcat
08598dedb1
Fix typo ( #7200 )
2021-04-03 09:36:54 -07:00
John MacFarlane
935d10769d
Fix "phrase" in DocBook: take classes from "role" not "class".
...
Closes #7195 . Revises #6438 .
2021-04-02 17:07:18 -07:00
tecosaur
4371223d13
Org writer: Use LaTeX style maths deliminators ( #7196 )
...
Org works better with LaTeX-style delimiters.
2021-04-01 23:36:02 +02:00
niszet
40da6c402b
Treat tabs as spaces in ODT Reader. ( #7185 )
2021-03-31 16:44:34 -07:00
Roman Beránek
fd0873c907
Require text for trypandoc ( #7193 )
2021-03-31 13:26:09 -07:00
Anti-Distinctlyminty
7e887c0a22
Update org.md ( #7189 )
...
SELECT_TAGS supported since ac83b9c37c
2021-03-30 08:34:44 -07:00
John MacFarlane
e22d1fbb14
Powerpoint writer: allow monofont to be specified in metadata...
...
...not just using `--variable` on the command line (as in
other writers). Closes #7187 .
2021-03-29 14:56:44 -07:00
TatianaPorras
a02ab4622d
Fixed typo #7159
...
This commit fixes the typo in the Lua filters documentation, see #7159
2021-03-28 14:16:32 +02:00
TatianaPorras
69d44b2c82
Fixed "The this" typo in lua-filters.md
...
The documentation for Lua filters said "The this module defines..."
This has been fixed to say "This module defines..."
2021-03-28 14:14:13 +02:00
John MacFarlane
d2495d0c75
Allow attoparsec 0.14.x.
2021-03-24 14:36:29 -07:00
John MacFarlane
56ce1fc126
Fix DocBook reader mathml regression...
...
...caused by the switch in XML libraries.
Also fixed a similar issue in JATS.
Closes #7173 .
2021-03-24 12:04:33 -07:00
John MacFarlane
88d3d55909
Require latest skylighting (fixes a bug in XML syntax highlighting).
2021-03-22 14:28:03 -07:00
John MacFarlane
052056289f
Simplify T.P.Asciify and export toAsciiText [API change].
...
Instead of encoding a giant (and incomplete) map, we now
just use unicode-transforms to normalize the text to
a canonical decomposition, and manipulate the result.
The new `toAsciiText` is equivalent to the old
`T.pack . mapMaybe toAsciiChar . T.unpack` but should be faster.
2021-03-21 23:40:19 -07:00
John MacFarlane
13021313e8
Update changelog, AUTHORS.
2021-03-20 18:40:18 -07:00
John MacFarlane
c389211e2f
Support yaml_metadata_block
extension form commonmark, gfm.
...
This is a bit more limited than with markdown, as documented
in the manual:
- The YAML block must be the first thing in the input.
- 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.
Closes #6537 .
2021-03-20 15:58:33 -07:00
John MacFarlane
2274eb88a4
Move yamlMetaBlock from Markdown reader to T.P.Readers.Metadata.
2021-03-20 15:58:33 -07:00
John MacFarlane
bea86f394e
Markdown reader: export yamlMetaBlock
.
...
[API change]
This will allow us to parse YAML metadata blocks in other
readers, potentially.
2021-03-20 15:58:33 -07:00
John MacFarlane
ce418667ae
Text.Pandoc.Parsing: remove F type synonym.
...
Muse and Org were defining their own F anyway, with their
own state. We therefore move this definition to the Markdown
reader.
2021-03-20 15:58:32 -07:00
John MacFarlane
4d041953f5
T.P.Readers.Metadata: made yamlBsToMeta
, yamlBsToRefs
polymorphic...
...
on the parser state, instead of requiring ParserState.
[API change]
2021-03-20 15:58:32 -07:00
John MacFarlane
84d8f3efd8
RST writer: use NonEmpty for init, last.
2021-03-20 15:58:32 -07:00
Erik Rask
82e8c29cb0
Include Header.Attr.attributes as XML attributes on section
...
Add key-value pairs found in the attributes list of Header.Attr as
XML attributes on the corresponding section element.
Any key name not allowed as an XML attribute name is dropped, as
are keys with invalid values where they are defined as enums in
DocBook, and xml:id (for DocBook 5)/id (for DocBook 4) to not
intervene with computed identifiers.
2021-03-20 21:29:17 +01:00
John MacFarlane
3861809815
Add date on changelog
2021-03-20 00:40:40 -07:00
John MacFarlane
80ae929922
Update man page and manual date.
2021-03-20 00:40:04 -07:00
John MacFarlane
99c15f8e85
Bump to 2.13, update changelog
2021-03-20 00:39:38 -07:00
John MacFarlane
a1a57bce4e
T.P.Shared: remove backslashEscapes
, escapeStringUsing
.
...
[API change]
These are inefficient association list lookups.
Replace with more efficient functions in the writers that
used them (with 10-25% performance improvements in
haddock, org, rtf, texinfo writers).
2021-03-20 00:24:49 -07:00
John MacFarlane
ceadf33246
Tests: Use getExecutablePath from base...
...
avoiding the need to depend on the executable-path package.
2021-03-19 23:35:47 -07:00
John MacFarlane
eacead3eb3
Fix fallback to default partials on templates.
...
If the directory containing a template does not contain
the partial, it should be sought in the default data files.
Closes #7164 .
2021-03-19 22:57:48 -07:00
John MacFarlane
dc94601eb5
Tests: factor out setupEnvironment in Test.Helpers.
...
This avoids code duplication between Command and Old.
2021-03-19 21:17:13 -07:00
John MacFarlane
2ca1b20a85
Fix finding of data files from test programs.
...
Apparently Cabal sets a `pandoc_datadir` environment variable
so that the data files will be sought in the source directory
rather than in the final destination (where they aren't yet
installed).
So we no longer need to set `--data-dir` in the tests. We just
need to make sure `pandoc_datadir` is set in the environment
when we call the program in the test suite.
This will fix the issue with loading of pandoc.lua when
pandoc is built with `-embed_data_files`, reported in #7163 .
Closes #7163 .
2021-03-19 18:57:13 -07:00
John MacFarlane
c3a9322b93
cabal.project: move flags: to top level (not under pandoc:).
...
If it's under the pandoc stanza, it can't be overriden on the
command line, it seems.
Also we remove ghc-options.
2021-03-19 14:51:21 -07:00
John MacFarlane
7678c48122
Hlint suggestion.
2021-03-19 14:43:42 -07:00
John MacFarlane
b0c8ba88a7
CI: test with different flags.
2021-03-19 14:34:13 -07:00
John MacFarlane
029de661f4
Narrow version bounds for skylighting, citeproc, and texmath.
...
This reduces the chance that tests will fail due to behavior
changes in one of these dependencies. (See e.g. #7163 )
2021-03-19 14:13:53 -07:00
John MacFarlane
005f0fbcd5
T.P.Shared: Remove ToString, ToText typeclasses [API change].
...
T.P.Parsing: revise type of readWithM so that it takes a Text
rather than a polymorphic ToText value.
These typeclasses were there to ease the transition from String
to Text. They are no longer needed, and they may clash with
more useful versions under the same name.
This will require a bump to 2.13.
2021-03-19 12:36:04 -07:00
John MacFarlane
425c2e47b5
Use skylighting 0.10.5.
...
This fixes a bad regression in Haskell syntax highlighting.
2021-03-19 11:58:56 -07:00
John MacFarlane
4002c35a91
Protect partial uses of maximum with NonEmpty.
2021-03-19 11:55:59 -07:00
John MacFarlane
8d5116381b
Use NonEmpty instead of minimumDef.
2021-03-19 10:30:32 -07:00
John MacFarlane
a31731b8e2
Docx reader: Don't reimplement NonEmpty.
2021-03-19 10:11:08 -07:00
John MacFarlane
3428248deb
Use minimumDef instead of minimum (partial function).
2021-03-18 23:01:12 -07:00
John MacFarlane
f0e4b9cc3c
Require safe >= 0.3.18 and remove cpp.
2021-03-18 21:37:56 -07:00
John MacFarlane
1da6208315
Rewrite a foldl1 as a foldl'.
2021-03-18 21:30:59 -07:00
John MacFarlane
67e173bda1
Remove another foldr1 partial function use.
2021-03-18 21:10:22 -07:00
John MacFarlane
fd76e605cd
T.P.Readers.Odt.StyleReader: rewrite foldr1 use as foldr.
...
This avoids a partial function.
2021-03-18 21:02:05 -07:00
John MacFarlane
2d10f46de5
Don't bake in extra stack size to the executables.
...
I don't think this is necessary; stack overflows generally
indicate a code problem and should be fixed (and have been when
reported).
2021-03-18 17:18:31 -07:00
John MacFarlane
a71732fd01
Minor revisions to provisional changelog.
2021-03-18 17:00:44 -07:00
John MacFarlane
2e00ed3fde
Bump to 2.12.1 and update changelog.
2021-03-18 15:50:13 -07:00
John MacFarlane
8235daf780
Use -A8m for default rtsopts for benchmark
2021-03-18 15:46:20 -07:00
John MacFarlane
87eb8dfda4
Revert the -j related changes in make_artifacts.sh.
...
This led to very slow build times.
2021-03-18 14:59:50 -07:00
John MacFarlane
4c51fa1d55
Change -A256m to -A8m in GHCOPTS
2021-03-18 13:07:54 -07:00