Commit graph

1429 commits

Author SHA1 Message Date
John MacFarlane
168b559c96 Use doctemplates 0.4.1 and citeproc 0.10. 2021-07-18 10:55:27 -07:00
John MacFarlane
cfa52e5824 Use skylighting 0.11. 2021-07-17 23:29:15 -07:00
John MacFarlane
ae22b1e977 RST reader: fix regression with code includes.
With the recent changes to include infrastructure,
included code blocks were getting an extra newline.

Closes #7436.  Added regression test.
2021-07-09 12:27:41 -07:00
John MacFarlane
7ac8fcbcac Require commonmark-pandoc >= 0.2.2.1.
This fixes task lists with multiple paragraphs.
2021-06-28 12:20:12 -07:00
John MacFarlane
0c4ed0045a Bump to 2.14.0.3, update changelog, require latest skylighting. 2021-06-20 19:25:43 -07:00
John MacFarlane
a8556ac06c Require commonmark 0.2.1. 2021-06-20 17:46:47 -07:00
John MacFarlane
67b3c36a93 Bump to 2.14.0.2, update chaneglog and manual. 2021-06-10 22:47:53 -07:00
John MacFarlane
17a2f4c49d Require citeproc 0.4.0.1.
This fixes a bug which led to doubled "et al." in some
(rare) circumstances.
2021-06-05 10:04:30 -06:00
John MacFarlane
677ccb7138 Bump to 2.14.0.1; update changelog and man page. 2021-05-31 22:07:12 -06:00
John MacFarlane
f363f00db8 Use commonmark-extensions 0.2.1.2 2021-05-29 19:20:03 -07:00
John MacFarlane
7aade73dce Replace biblatex-exmaples.bib with shorter averroes.bib in tests. 2021-05-29 12:14:37 -07:00
John MacFarlane
e72d2dd962 Use latest commonmark. 2021-05-28 13:14:56 -07:00
John MacFarlane
834da53058 Add rebase_relative_paths extension.
- Add manual entry for (non-default) extension
  `rebase_relative_paths`.
- Add constructor `Ext_rebase_relative_paths` to `Extensions`
  in Text.Pandoc.Extensions [API change]. When enabled, this
  extension rewrites relative image and link paths by prepending
  the (relative) directory of the containing file.
- Make Markdown reader sensitive to the new extension.
- Add tests for #3752.

Closes #3752.

NB. currently the extension applies to markdown and associated
readers but not commonmark/gfm.
2021-05-27 10:38:25 -07:00
Albert Krewinkel
54ab7a0a3b CI: test with GHC 9.0.1 2021-05-25 11:52:49 -07:00
Albert Krewinkel
bb2530caa4 Use haddock-library-1.10.0 2021-05-25 11:52:49 -07:00
Albert Krewinkel
d46ea7d7da
Jira: add support for "smart" links
Support has been added for the new
`[alias|https://example.com|smart-card]` syntax.
2021-05-25 16:54:42 +02:00
Albert Krewinkel
c5f9446646
Use jira-wiki-markup 1.3.5
* Allow spaces and most unicode characters in attachment links.

* No longer require a newline character after `{noformat}`.

* Only allow URI path segment characters in bare links.

* The `file:` schema is no longer allowed in bare links; these
  rarely make sense.

Closes: #7218
2021-05-24 08:45:59 +02:00
John MacFarlane
971a31b4d8 Bump upper-bounds for network-uri, time.
Change stack.yaml to use lts-17.12.
2021-05-21 10:51:35 -07:00
John MacFarlane
b243bf0f44 Bump to 2.14 and update changelog. 2021-05-13 14:10:47 -07:00
John MacFarlane
84fa901fd6 Use texmath 0.12.3. 2021-05-12 12:52:04 -07:00
John MacFarlane
6e45607f99 Change reader types, allowing better tracking of source positions.
Previously, when multiple file arguments were provided, pandoc
simply concatenated them and passed the contents to the readers,
which took a Text argument.

As a result, the readers had no way of knowing which file
was the source of any particular bit of text.  This meant that
we couldn't report accurate source positions on errors or
include accurate source positions as attributes in the AST.
More seriously, it meant that we couldn't resolve resource
paths relative to the files containing them
(see e.g. #5501, #6632, #6384, #3752).

Add Text.Pandoc.Sources (exported module), with a `Sources` type
and a `ToSources` class.  A `Sources` wraps a list of `(SourcePos,
Text)` pairs. [API change] A parsec `Stream` instance is provided for
`Sources`.  The module also exports versions of parsec's `satisfy` and
other Char parsers that track source positions accurately from a
`Sources` stream (or any instance of the new `UpdateSourcePos` class).

Text.Pandoc.Parsing now exports these modified Char parsers instead of
the ones parsec provides.  Modified parsers to use a `Sources` as stream
[API change].

The readers that previously took a `Text` argument have been
modified to take any instance of `ToSources`. So, they may still
be used with a `Text`, but they can also be used with a `Sources`
object.

In Text.Pandoc.Error, modified the constructor PandocParsecError
to take a `Sources` rather than a `Text` as first argument,
so parse error locations can be accurately reported.

T.P.Error: showPos, do not print "-" as source name.
2021-05-09 19:11:34 -06:00
Albert Krewinkel
3da919e35d
Add new internal module Text.Pandoc.Writers.GridTable 2021-05-01 18:52:24 +02:00
John MacFarlane
16b64bda38 Use dev texmath, citeproc. 2021-04-25 21:56:54 -07:00
Albert Krewinkel
0b74bbbdaa
Docx writer: extract Table handling into separate module 2021-04-20 10:57:54 +02:00
John MacFarlane
b7a2632184 Use lastest unicode-collation. 2021-04-18 11:34:12 -07:00
John MacFarlane
aecbf8156e Remove Text.Pandoc.BCP47 module.
[API change]

Use Lang from UnicodeCollation.Lang instead.
This is a richer implementation of BCP 47.
2021-04-17 16:15:14 -07:00
John MacFarlane
7ba8c0d2a5 Move getLang from BCP47 -> T.P.Writers.Shared.
[API change]
2021-04-17 16:15:13 -07:00
John MacFarlane
2e7fee9c3c Use latest xml-conduit. 2021-04-15 14:30:33 -07:00
Roman Beránek
fd0873c907
Require text for trypandoc (#7193) 2021-03-31 13:26:09 -07:00
John MacFarlane
d2495d0c75 Allow attoparsec 0.14.x. 2021-03-24 14:36:29 -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
99c15f8e85 Bump to 2.13, update changelog 2021-03-20 00:39:38 -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
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
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
f0e4b9cc3c Require safe >= 0.3.18 and remove cpp. 2021-03-18 21:37:56 -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
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
c7230182a0 pandoc.cabal: bake in -A8m to rtsopts.
This reserves a larger allocation area and reduces GC,
speeding up execution.
2021-03-18 11:02:46 -07:00
Alexey Kuleshevich
613c070cbd
Update bounds for random (#7156) 2021-03-17 18:57:32 -07:00
John MacFarlane
c6e5cf2e74 Benchmark improvements.
* Build `+RTS -A256m -RTS` into default ghc-options for benchmark,
  so we don't have to specify this separately on the command line.
  This is necessary to get accurate benchmark results; otherwise
  we are largely measuring garbage collecting, some not related
  to the current benchmark.
* Switch back from gauge to tasty-bench.
* Allow specifying BASELINE file in 'make bench' for comparison
  (otherwise the latest is chosen by default).
* Remove obsolete reference to weigh-pandoc from CONTRIBUTING.md.
* Remove `-Rghc-timing` from 'make bench'.
2021-03-17 13:34:17 -07:00
John MacFarlane
1ef3534328 Increase heap space in runtime for benchmarks.
Otherwise we're essentially benchmarking garbage collecting,
which can give very inconsistent results.
2021-03-16 15:59:50 -07:00
John MacFarlane
ff0fcedcb3 Switch to gauge for now for benchmarks.
tasty-bench is displaying odd behavior, with different
timings depending on the `--pattern` specified.
2021-03-15 22:50:18 -07:00
John MacFarlane
5f94dd74f1 Require texmath 0.12.2 2021-03-15 15:36:57 -07:00
John MacFarlane
39934c8851 Require latest doclayout and skylighting. 2021-03-14 15:48:01 -07:00
John MacFarlane
3519d6f3b4 Use eciteproc >= 0.3.0.9 2021-03-13 11:27:05 -08:00
Albert Krewinkel
f8b49e77f8
Use jira-wiki-markup 1.3.4
Jira reader:

* 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.

Jira writer:

* Block quotes are only rendered as `bq.` if they do not contain a
  linebreak.
2021-03-13 14:53:58 +01:00
John MacFarlane
e17127dc28 Re-add a needed dependency for benchmark. 2021-03-09 13:40:24 -08:00
John MacFarlane
a8b2031bb4 Revert "Use -Wunused-packages on ghc >= 8.10."
This reverts commit 7a1d0f01e9.

This option gives confusing output when a build is interrupted,
suggesting that packages aren't required when we just didn't
get to the model that requires them.
2021-03-09 12:49:15 -08:00