Commit graph

15533 commits

Author SHA1 Message Date
Jonathan Dönszelmann
cd931e55b6
Refactor Text.Pandoc.Writers.EPUB (#7991)
Refactor for readability.

Co-authored-by: Ola Wolska <A.k.wolska@student.tudelft.nl@gmail.com>
Co-authored-by: Ivar de Bruin <ivardb@gmail.com>
Co-authored-by: Jaap de Jong <jaapdejong15@gmail.com>
2022-03-29 08:40:20 -07:00
Albert Krewinkel
40dd8fd129
Include Lua version in --version output. (#7997) 2022-03-29 08:38:00 -07:00
Albert Krewinkel
e4f4be6c80
Remove redundant dependency on hslua-marshalling.
The package is a dependency of hslua; all important modules are
re-exported.
2022-03-29 08:04:49 +02:00
John MacFarlane
807a574e9d JATS reader: strip 'ref-' from ref id in constructing CSL id.
This allows better round-tripping, because the JATS
writer adds the `ref-` prefix to the citation id to get
the ref element's id.
2022-03-28 18:50:03 -07:00
John MacFarlane
51c8b059e1 JATS reader: improve refs parsing.
Handle issn and isbn; use simpler form for issued date.
2022-03-28 18:37:33 -07:00
John MacFarlane
6217fd0976 JATS writer: Fix handling of CSL variable 'page'.
Not 'pages' as we had before.  It should go to 'lpage' and 'rpage',
not 'page-range'.  See
https://jats.nlm.nih.gov/archiving/tag-library/1.1/element/page-range.html

Fixed some mistakes in test #7042.
2022-03-28 17:04:10 -07:00
John MacFarlane
5c7dc4c7f3 JATS reader: support PMID, DOI, issue in citations.
Closes #7995.
2022-03-28 17:04:10 -07:00
Albert Krewinkel
c5cd03a022
JATS writer: keep edition info in element citations.
Closes: #7993
2022-03-28 21:45:56 +02:00
John MacFarlane
f5129666e7 Add lua53 flag.
It is false by default.  If set to true, compile with hslua 2.1
and Lua 5.3, otherwise hslua 2.2 and Lua 5.4.
2022-03-28 10:06:52 -07:00
John MacFarlane
35350fac85 JATS writer: avoid doubled ref-list element.
Previously when generating JATS with the `element_citations`
extension enabled, the references were put in a doubly-nested
ref-list element (`<ref-list><ref-list>...`).  This is now fixed.

Closes #7990.
2022-03-27 09:32:55 -07:00
Nikolai Korobeinikov
e2923747a4
Docx writer: add bookmark with table id to table (#7989)
This allows tables with ids to be linked to.

Closes #7285.
2022-03-26 10:00:05 -07:00
John MacFarlane
51f18d52c7 Rename T.P.Parsing.Combinators -> T.P.Parsing.General.
Because many of the exported things aren't combinators...

Also remove redundant explot of indentWith from T.P.Parsing.Lists.
2022-03-25 11:14:54 -07:00
John MacFarlane
f520ac9b17 T.P.Parsing: use explicit imports. 2022-03-25 11:03:35 -07:00
John MacFarlane
1572c27241 More optimization of RTF reader. 2022-03-25 09:14:47 -07:00
John MacFarlane
672822cf98 RTF reader: optimize parsing of unformatted text. 2022-03-25 08:38:50 -07:00
John MacFarlane
dafdd16e10 Sources: small strictness optimization 2022-03-25 08:38:10 -07:00
John MacFarlane
36786e86fb RTF reader: more memory usage optimizations.
See #7943.
2022-03-24 23:39:14 -07:00
John MacFarlane
0de829090c Small optimizations in RTF reader. 2022-03-24 22:39:24 -07:00
dependabot[bot]
c34340aaaf
Bump actions/checkout from 2 to 3 (#7986)
Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 3.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v2...v3)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-24 17:51:31 -07:00
dependabot[bot]
b15fe8e515
Bump actions/cache from 2 to 3 (#7987)
Bumps [actions/cache](https://github.com/actions/cache) from 2 to 3.
- [Release notes](https://github.com/actions/cache/releases)
- [Commits](https://github.com/actions/cache/compare/v2...v3)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-24 17:50:58 -07:00
Naveen
ab07beec77
Included githubactions in the dependabot config (#7985)
This should help with keeping the GitHub actions updated on new releases. This will also help with keeping it secure.

Dependabot helps in keeping the supply chain secure https://docs.github.com/en/code-security/dependabot

GitHub actions up to date https://docs.github.com/en/code-security/dependabot/working-with-dependabot/keeping-your-actions-up-to-date-with-dependabot

https://github.com/ossf/scorecard/blob/main/docs/checks.md#dependency-update-tool
2022-03-24 13:25:58 -07:00
John MacFarlane
3c963bf889 Use cabal for 'make bench'. 2022-03-24 12:34:17 -07:00
Albert Krewinkel
b9eeb77df5
[API change] Unify grid table parsing (#7971)
Grid table parsing in Markdown and rst are updated use the same
functions. Functions are generalized to meet requirements for both
formats.

This change also lays the ground for further generalizations in table
parsers, including support for advanced table features.

API changes in Text.Pandoc.Parsing:

- Parse results of functions `tableWith'` and `gridTableWith'` are now a
  `mf TableComponents` instead of a quadruple of alignments, column
  widths, header rows and body rows.

Additional exports from Text.Pandoc.Parsing:

- `tableWith'`
- `TableComponents`
- `TableNormalization`
- `toTableComponents`
- `toTableComponents'`
2022-03-24 11:59:20 -07:00
John MacFarlane
9fa2aeb489 RTF reader: more efficient parsing of command parameters. 2022-03-24 11:38:55 -07:00
John MacFarlane
512da9aeb9 Makefile: Use cabal for default build 2022-03-24 11:38:39 -07:00
John MacFarlane
acb187753a Change benchmarks to use ghc 9.2.2 instead of 8.8.4. 2022-03-24 09:57:32 -07:00
Naveen
f4a7ba967e
Set permissions for GitHub actions (#7984)
This limits the damage that a compromised GitHub action could do.

See https://github.com/ossf/scorecard/blob/main/docs/checks.md#token-permissions
https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs
2022-03-24 09:32:57 -07:00
John MacFarlane
8d04565394 Replace haskell/actions/setup with ghcup.
ghcup is installed by default on the GitHub runners.

This allows us to avoid relying on a third-party action
and may render #7984 irrelevant.
2022-03-24 09:26:47 -07:00
John MacFarlane
dff340ed50 CI: Test with ghc 9.2.2. 2022-03-24 09:22:10 -07:00
John MacFarlane
db0a2c3947 Remove unnecessary dependency on hslua-aeson. 2022-03-24 09:20:56 -07:00
John MacFarlane
f2eb52ad80 Use current dev versions of citeproc, doclayout. 2022-03-23 13:51:14 -07:00
John MacFarlane
5fdcb36c80 Use latest dev citeproc. 2022-03-23 08:52:47 -07:00
Mario Lang
6e94c8ddcd
doc/lua-filters.md: Fix typo (#7981) 2022-03-23 11:15:43 +01:00
John MacFarlane
98275f1a85 Revert "Try re-enabling ghc 9.2.2 tests on CI."
This reverts commit 26f64c4d05.
2022-03-22 10:08:49 -07:00
John MacFarlane
26f64c4d05 Try re-enabling ghc 9.2.2 tests on CI. 2022-03-22 09:42:33 -07:00
Albert Krewinkel
4394fdf59c
JATS writer: encode author "others" as <etal/>
Citeproc adopted the BibTeX convention to use the author name "others"
when there are additional authors that are not named. JATS uses the
`<etal>` element for this.
2022-03-22 15:09:14 +01:00
John MacFarlane
9053214fba LaTeX template: Move urlstyle and xurl commands to after hyperref.
Closes #7978.
2022-03-21 10:42:18 -07:00
John MacFarlane
e2d05626fc Use latest dev texmath. 2022-03-20 11:51:31 -07:00
Albert Krewinkel
69177861a4
Parsing.GridTable: simplify column handling code. 2022-03-18 14:20:49 +01:00
Albert Krewinkel
eaba313fb3
Writers.GridTable: improve module documentation. 2022-03-18 14:16:03 +01:00
Albert Krewinkel
43e549b2fb
Markdown writer: move table-related code into submodule. 2022-03-18 14:15:56 +01:00
John MacFarlane
d69807fb92 Minor changes to security section of manual. 2022-03-17 09:45:29 -07:00
John MacFarlane
75ddff2422 Allow formatted bibliography to be placed in metadata fields.
This modifies `processCitations` so that pandoc will look not just
in the document body but in metadata for a Div with id `refs` in
which to place the formatted bibliography.

Thus, one can include a metadata field, say `refs`, whose content
is an empty div with id `refs`, and the formatted bibliography
will be put into this metadata field.  It may then be interpolated
into a template using the variable `refs`.

Closes #7969.

Closes #526 by providing a way to interpolate references into
a template.
2022-03-16 14:37:51 -07:00
John MacFarlane
878c4d6607 Remove obsolete stuff from Makefile. 2022-03-16 09:04:50 -07:00
John MacFarlane
54f6e1be9b Remove native_divs from allowed gfm extensions.
This allows `<div>` to be suppressed using `-raw_html`.
Previously `native_divs` was enabled but could
not be suppressed, because it was not in the list of
available extensions for commonmark-based formats.

Closes #7965.
2022-03-14 12:45:45 -07:00
John MacFarlane
c9cf8568bf LaTeX template: Fix regression with code in footnotes...
...due to moving hyperref later in the template.

Closes #7964.
2022-03-14 12:28:56 -07:00
John MacFarlane
9b5e6a8944 Skip ghc 9.2.2 tests for now...
the are failing with exit 1 in linker phase (out of memory?).
2022-03-14 08:35:38 -07:00
John MacFarlane
307a4e25b2 CI: use ghcup to install ghc, cabal; use ghc 9.2.2. 2022-03-13 23:23:53 -07:00
John MacFarlane
d0a874bd30 Add CI for ghc 9.2.1. 2022-03-13 17:44:35 -07:00
John MacFarlane
8d3959ea29 Remove special redefinition of \sout.
This used to be necessary to avoid problems with hyperref,
when headings contain strikeout text, but it does not seem to be
necessary any more (tested).
2022-03-13 17:18:31 -07:00