Commit graph

1558 commits

Author SHA1 Message Date
Albert Krewinkel
c724e9cb7c
Require pandoc-lua-marshal 0.1.7
Adds a `clone` methods to Pandoc objects and allows to pass Blocks in
instead of full Caption elements.
2022-07-16 15:29:18 +02:00
John MacFarlane
3571352a0a Use citeproc 0.8. 2022-07-01 12:12:58 +02:00
Albert Krewinkel
6d351df1ed
Lua: ensure that tables marshaled via JSON arrays behave like Lists.
This allows to invoke methods like `map` and `includes` on lists like
`PANDOC_WRITER_OPTIONS.extensions`.
2022-06-23 22:53:11 +02:00
Albert Krewinkel
0f573a5368
Require hslua-2.2.1, unless lua53 flag is set.
This fixes a problem where the encoding used for Lua filenames would
sometimes mismatch the encoding used by the OS. The file wasn't found
when that happened, for example with an umlaut-containing filename on
Windows. The change ensures that all characters of available in the
default locale can be used in the filename.
2022-06-19 14:30:27 +02:00
Albert Krewinkel
a4a0a47a91
Allow aeson 2.1 (#8130) 2022-06-16 11:34:52 -06:00
Albert Krewinkel
0bd8a0e3d1
CI: test with latest GHC minor versions 2022-06-16 12:14:55 +02:00
Albert Krewinkel
42cbc71bbc
Allow placing custom readers and writers in data subdir (#8112)
* PandocMonad: add new function `findFileWithDataFallback` [API Change]
* Custom readers: allow files to be placed in "readers" data dir
* Custom writers: allow files to be placed in "writers" data dir
2022-06-10 08:37:12 -07:00
Albert Krewinkel
b3cee8bdb0
Lua: Simplify module loading code.
Modules are now loaded directly; the special pandoc Lua package searcher
is no longer necessary and has been removed.
2022-06-08 22:45:28 +02:00
Albert Krewinkel
15f91964b3
Require pandoc-lua-marshal 0.1.6
Fixes: #8101
2022-06-03 10:29:01 +02:00
John MacFarlane
9aff86143e Require skylighting 0.12.3.1 and update tests. 2022-05-31 19:49:27 -07:00
John MacFarlane
dc03399cc3 Add 'nightly' flag.
This causes a `-nightly-COMPILEDATE` suffix to be added the
the output of `--version`.

This is used in the nightly CI builds.

Closes #8016.
2022-04-12 18:03:26 -07:00
John MacFarlane
f460936528 Revert "Add 'nightly' flag and build with this for nightlies."
This reverts commit f81f5a2090.
2022-04-12 10:06:02 -07:00
John MacFarlane
f81f5a2090 Add 'nightly' flag and build with this for nightlies.
This flag causes a suffix '-nightly-YYYY-MM-DD' to be added
to the version for nightlies.

Closes #8016.
2022-04-11 17:17:11 -07:00
John MacFarlane
0ddddf2f37 Revert "Add info about git commit and date to --version info."
This reverts commit 9d7c01e4a4.
2022-04-11 13:14:38 -07:00
John MacFarlane
c13db98dce Revert "Relax version bound on githash so the version in stackage works."
This reverts commit 69ad7cbcbd.
2022-04-11 13:14:36 -07:00
John MacFarlane
69ad7cbcbd Relax version bound on githash so the version in stackage works. 2022-04-11 11:35:54 -07:00
John MacFarlane
9d7c01e4a4 Add info about git commit and date to --version info.
See #8016.
2022-04-11 10:40:51 -07:00
John MacFarlane
c47b2a21bd Bump to 2.18. 2022-04-04 09:42:55 -07:00
John MacFarlane
c18bb2ab58 Use latest doclayout (0.4) 2022-04-03 23:13:48 -07:00
John MacFarlane
705abd0f51 Increase lower bounds for commonmark, texmath. 2022-04-02 16:58:12 -07:00
John MacFarlane
feb5b03976 Use citeproc 0.7. 2022-04-02 13:33:05 -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
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
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
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
Albert Krewinkel
43e549b2fb
Markdown writer: move table-related code into submodule. 2022-03-18 14:15:56 +01:00
Albert Krewinkel
1aeeba9ecb
Shared: define ordNub as alias for nubOrd from containers package (#7963)
This requires at least containers 0.6.0.1, which ships with the oldest
GHC version currently supported by pandoc (GHC 8.6).
2022-03-13 08:42:30 -07:00
John MacFarlane
d523eca3d3 Use dev version of pandoc-types.
This allows toJSONFilter to work with Meta and MetaValue.
2022-03-11 10:23:06 -08:00
Albert Krewinkel
517bceeba8
Parsing: partition module into (internal) submodules (#7962) 2022-03-11 09:21:59 -08:00
John MacFarlane
5375bd1446 DocBook reader: handle complete set of entities...
as specified at <https://www.w3.org/2003/entities/2007doc/byalpha.html>.

Closes #7938.
2022-02-24 15:50:53 -08:00
John MacFarlane
7dea81f992 Text.Pandoc.XML.Light: add versions of the parsers...
that allow specifying a custom entity map.

Exports new functions `parseXMLElementWithEntities`,
`parseXMLContentsWithEntities` [API change].
2022-02-24 14:47:35 -08:00
Albert Krewinkel
a3117bc142
Relax upper bound for hslua, allow hslua-2.2. (#7929)
Lua 5.4 is used by default after this is merged. Packagers may still include Lua 5.3
instead by building pandoc with `--constraint='hslua <2.2'`.

Differences between 5.3 and 5.4 should not generally affect pandoc Lua filters.
See list of incompatible changes here  <https://www.lua.org/manual/5.4/manual.html#8.1>
2022-02-19 11:26:18 -08:00
John MacFarlane
2a70d9c3c5 Require skylighting 0.12.3. 2022-02-18 12:00:39 -08:00
Albert Krewinkel
910296b745
Lua: Use pandoc-lua-marshal 0.1.5.
-   Allow any type of callable object as argument to List
    functions `filter`, `map`, and `find_if`. These previously
    required the argument to be of type `function`, which was too
    restrictive.

-   Inline: the type of Image captions is now `Inlines` instead
    of `List`.
2022-02-17 16:00:20 +01:00
Albert Krewinkel
f738c451d7 Lua: move custom writer code into Lua hierarchy. 2022-02-06 16:37:39 -08:00
Albert Krewinkel
49f1e7608e Lua: add module pandoc.layout to format and layout text 2022-02-06 16:01:24 -08:00
John MacFarlane
3da5440858 Add RIS bibliography format reader.
New module, Text.Pandoc.Readers.RIS, exporting readRIS.

New input format `ris`.

Closes #7894.
2022-02-05 23:25:03 -08:00
John MacFarlane
f813aca3ea Add endnotexml test to pandoc.cabal extra-source-files. 2022-02-04 23:39:39 -08:00
John MacFarlane
34897031f4 Add endnote XML reader.
New input format: endnotexml

New reader module: Text.Pandoc.Readers.EndNote, exporting
`readEndNoteXML` and `readEndNoteXMLReferences`. [API change]

This reader is still a bit rudimentary, but it should get
be good enough to be helpful.
2022-02-04 10:03:52 -08:00
John MacFarlane
a081859743 Bump to 2.17.1.1, update changelog and man page. 2022-01-31 09:45:44 -08:00
John MacFarlane
9f282a025e Bump to 2.17.1. Provisionally update changelog. 2022-01-29 23:16:10 -08:00
Albert Krewinkel
412596c30b Switch to hslua-2.1
This allows for some code simplification and improves stability.
2022-01-29 08:43:14 -08:00
Even Brenden
d36a16a4df Don't read files outside of user data directory
If a file path does not exist relative to the working directory, but
it does exist relative to the user data directory, and it exists outside
of the user data directory, do not read it. This applies to readDataFile
and readMetadataFile in PandocMonad and, by extension, any module that
uses these by passing them relative paths.
2022-01-28 08:51:27 -08:00
Even Brenden
7df29e495f
Search for metadata files in $DATADIR/metadata (#7851)
If files specified with `--metadata-file` are not found in the working
directory, look in `$DATADIR/metadata`.

Expose new `readMetadataFile` function from Text.Pandoc.Class
[API change].

Expose new `PandocCouldNotFindMetadataFileError` constructor for
`PandocError` from Text.Pandoc.Error [API change].

Closes #5876.
2022-01-21 12:00:45 -08:00
John MacFarlane
89c8f2866e Use skylighting 0.12.2. 2022-01-19 15:44:27 -08:00
John MacFarlane
20c4bc3261 Bump to 2.17.0.1, update changelog. 2022-01-14 10:36:33 -08:00
John MacFarlane
7f4907b2ce Use commonmark-pandoc 0.2.1.2.
Fixes #7769.
2022-01-14 10:07:06 -08:00
Albert Krewinkel
96db10c8d7 Require pandoc-lua-marshal 0.1.3.1
Fixes a problem with `List.includes` and `List.find` that caused a Lua
stackoverflow and subsequent program crash.

Fixes: #7831
2022-01-14 11:05:19 +01:00
John MacFarlane
95adabd3cc Bump version to 2.17. 2022-01-12 15:12:36 -08:00