John MacFarlane
4a47ffb8ba
Text.Pandoc.App: Change parseOptionsFromArgs and parseOptions...
...
They now return `Either OptInfo Opt`.
Add `OptInfo` type.
Add `handleOptInfo` function. This performs the IO actions for
things like `--version` that were previously done in `parseOptionsFromArgs`.
An argument for a `ScriptingEngine` has been added, to facilitate
printing custom templates and custom extensions for Lua filters.
(However, at this stage nothing is yet done with it.)
[API change]
2022-10-31 11:29:23 -07:00
John MacFarlane
3e48d9701d
Re-add TemplateHaskell pragma in pandoc-cli.
...
This was an hlint false positive.
2022-10-31 09:03:10 -07:00
John MacFarlane
487d8003a5
Improve 'make lint'.
2022-10-30 12:39:37 -07:00
John MacFarlane
c7af10fe89
hlint suggestions.
2022-10-30 12:37:19 -07:00
John MacFarlane
8b3be07ae8
hlint suggestions.
2022-10-30 11:02:00 -07:00
John MacFarlane
55b8d0abee
make lint: remove apply-refact
2022-10-30 11:01:58 -07:00
John MacFarlane
5dc2927c8a
.hlint.yaml: ignore "Use <&>"
2022-10-30 10:59:24 -07:00
John MacFarlane
4f138b440b
Nightly: strip executables on windows and macos.
2022-10-29 22:19:28 -07:00
John MacFarlane
73b7c63010
Use cabal for nightly builds.
2022-10-29 14:34:15 -07:00
John MacFarlane
cd6945fb4b
Fix an import warning.
2022-10-29 14:34:09 -07:00
John MacFarlane
56fe6fe417
Nightly windows: add stack clean.
2022-10-29 13:15:53 -07:00
John MacFarlane
bfdf170330
Use T.P.XML lookupEntity in Jira reader.
2022-10-29 13:15:04 -07:00
John MacFarlane
139f9c064d
Re-export lookupEntity from Text.Pandoc.XML [API change].
2022-10-29 12:01:45 -07:00
John MacFarlane
86a8a8e107
T.P.XML: use lookupEntity from commonmark-hs.
2022-10-29 11:46:08 -07:00
John MacFarlane
512cf5a908
T.P.Parsing.General: change characterReference, charsInBalanced.
...
`characterReference` now returns a Text (as it should, because some
named references don't correspond to a single Char), and uses
the `lookupEntity` function from commonmark-hs instead of the slow
one from tagsoup.
`charsInBalanced` now takes a Text parser rather than a Char parser
as argument.
[API change]
2022-10-29 11:46:03 -07:00
John MacFarlane
82072f588c
ALlow nightly action to be run manually.
2022-10-29 10:59:53 -07:00
John MacFarlane
3ceb7a6261
Nightly windows build: use --local-bin-path to place binary.
2022-10-29 10:57:05 -07:00
John MacFarlane
1690a240e0
Use skylighting 0.13.1.1
2022-10-28 15:59:03 -07:00
John MacFarlane
ef79995a5a
stack.yaml: use dev version of citeproc.
2022-10-28 10:18:10 -07:00
John MacFarlane
0be828c103
CI: add ghc 9.4.2.
2022-10-28 09:33:03 -07:00
John MacFarlane
135cfed2a3
Print starting server message to stderr instead of stdout.
2022-10-28 09:32:50 -07:00
John MacFarlane
552d3b42ae
Issue message when starting up server indicating the port.
2022-10-28 09:30:24 -07:00
John MacFarlane
9d8d1a0b9e
Use ghc4pandoc 9.4.2 docker image.
2022-10-28 09:19:13 -07:00
John MacFarlane
e9b3636bc1
Don't fail on inline metadata beginning with newline.
...
Closes #8358 .
2022-10-27 22:04:46 -07:00
Albert Krewinkel
999916642c
Fix test for template marshaling.
2022-10-27 22:46:34 +02:00
Albert Krewinkel
6c4d885bda
Lua: allow strings in place of compiled templates.
...
This allows to use a string as parameter to `pandoc.template.apply` and
in the WriterOptions `template` field.
Closes : #8321
2022-10-27 22:09:39 +02:00
John MacFarlane
91436ebbf4
T.P.Writers.Shared toTableOfContents: handle nested Divs better.
...
Closes #8402 .
2022-10-27 12:46:59 -07:00
John MacFarlane
87f4247d9e
T.P.PDF: fix papersize on PDF generation via ms.
...
We need to set an option in pdfroff in addition to including
a macro in the ms file.
With this fix, `-Vpapersize=a4` should be sufficient to
produce A4 PDF via ms.
Closes #8403 .
2022-10-27 10:01:26 -07:00
John MacFarlane
246e14e75a
LaTeX reader: fix TEXINPUTS handling.
...
If TEXINPUTS ends with `:`, then the system default TEXINPUTS
is added. We handle this by just adding the working directory
in this case.
Closes #8392 .
2022-10-26 18:51:50 -07:00
John MacFarlane
b8047e350c
ICML writer: use Contents element for images with raw data...
...
instead of a link with a data: uri.
Closes #8398 .
2022-10-26 09:05:09 -07:00
John MacFarlane
031420b2d2
Move aeson constraint from cabal.project to pandoc.cabal.
2022-10-26 08:30:30 -07:00
John MacFarlane
415550a36a
Use latest dev citeproc.
...
This will raise an error if we have multiple layout elements
in a bibliography or citation element.
2022-10-25 10:43:57 -07:00
John MacFarlane
4aeedd4c66
Use latest dev citeproc.
2022-10-25 10:37:21 -07:00
John MacFarlane
f282f0bd37
Remove type alias WriterProperties.
...
I don't think this aids clarity, and anyway it's not exported.
2022-10-25 10:28:25 -07:00
John MacFarlane
6e1cfa2af5
Lua: rename reader_extensions/writer_extensions globals...
...
...as `Extensions`.
Update documnetation.
Include a custom extension in the documentation example.
See #8390 .
2022-10-25 10:17:23 -07:00
John MacFarlane
119de20e60
Use dev version of citeproc.
2022-10-25 10:08:39 -07:00
John MacFarlane
368f3fd71f
Rename T.P.Readers.Odt -> T.P.Readers.ODT.
...
For consistency with Writers.ODT.
Similarly, rename `readOdt` -> `readODT`.
[API change]
2022-10-24 22:58:03 -07:00
John MacFarlane
e6866c1543
Rename T.P.Writers.Docbook -> T.P.Writers.DocBook.
...
Similarly, rename `writeDocbook` -> `writeDocBook`, for
consistency with the DocBook reader's naming.
[API change]
2022-10-24 22:49:25 -07:00
John MacFarlane
4696af3125
ODT reader: fix relative links.
...
ODT adds a `../` to relative links (see #3524 ); this needs to be
removed when converting from ODT.
2022-10-24 20:25:09 -07:00
John MacFarlane
8b0519bd3e
ODT writer: further refinement to #3524 .
...
Don't alter the link if the path is empty.
2022-10-24 20:24:27 -07:00
John MacFarlane
0e85a77f78
Switch release_candidate workflow to workflow_dispatch
2022-10-24 16:23:30 -07:00
John MacFarlane
c73ebb8a03
ODT writer:
...
Revise commit 9496ce818b
so it doesn't change image links. (These should have already been
adjusted.)
See #3524 .
2022-10-24 14:35:17 -07:00
John MacFarlane
9496ce818b
ODT writer: fix relative links.
...
Closes #3524 .
2022-10-24 10:44:18 -07:00
Albert Krewinkel
79d6b45566
Remove sample.lua from data files ( #8397 )
...
The file is kept around in the pandoc-lua-engine test-suite.
Closes : #8356
2022-10-24 09:46:42 -07:00
John MacFarlane
400d4e1387
LaTeX reader: parse short table caption.
...
See jgm/pandoc-types#103 .
This is not too useful yet, because writers don't do anything with
the short caption.
2022-10-21 11:44:12 -07:00
Albert Krewinkel
e243cd696f
Lua: add pandoc.scaffolding.Writer ( #8377 )
...
This can be used to reduce boilerplate in custom writers.
2022-10-21 10:11:45 -07:00
John MacFarlane
296788ec2b
T.P.Lua.Module.Pandoc: Remove pushModule.
...
This is not used and is not an exported function; it's dead code.
@tarleb if there is some reason to keep this here, please feel
free to revert this.
2022-10-20 21:29:29 -07:00
John MacFarlane
23921b2ef1
Text.Pandoc.Parsing: remove nested [API change].
...
It was not being used, and in fact it was a bad idea from
the beginning, as it had no hope of solving the problem
it was introduced to solve.
2022-10-20 21:05:58 -07:00
John MacFarlane
af12b56d06
Makeflie: add hie.yaml target.
2022-10-20 20:05:50 -07:00
John MacFarlane
ae2b6ee7b9
Regenerate hie.yaml
2022-10-20 19:53:19 -07:00