Commit graph

12712 commits

Author SHA1 Message Date
John MacFarlane
3b52baab8e GitHub CI - use matrix for linux/cabal build. 2019-09-16 23:33:05 -07:00
John MacFarlane
255f3c0a8e GitHub CI - take 2 on macos build. 2019-09-16 22:03:47 -07:00
John MacFarlane
d9125ac9bc GitHub CI - add macos. 2019-09-16 21:44:54 -07:00
John MacFarlane
6c077b8f2c GitHub CI - cleanup. 2019-09-16 11:05:04 -07:00
John MacFarlane
fa12d4ed37 GitHub CI - trigger build on workflow/haskell.yml change. 2019-09-16 11:03:48 -07:00
John MacFarlane
b030d23893 GitHub CI: don't trigger build with doc changes. 2019-09-16 10:45:13 -07:00
John MacFarlane
d3e2d3c434 GitHub CI: comment out artifact uploading for now. 2019-09-16 09:48:57 -07:00
John MacFarlane
b222272b60 Add note on --print-default-template explaining how to print partials. 2019-09-16 09:45:03 -07:00
John MacFarlane
297afd0aa9 PDF: Fix test for Cygwin. See #5451. 2019-09-16 08:30:57 -07:00
John MacFarlane
4fe6bd4759 GitHub CI: fix finding of executables. 2019-09-16 08:12:54 -07:00
John MacFarlane
09cf70959f GitHub CI - another attempt to install artifacts. 2019-09-15 22:35:50 -07:00
John MacFarlane
9a07667ab3 GitHuB CI tweak. cabal v2-install doesn't respect --bindir? 2019-09-15 21:46:01 -07:00
John MacFarlane
2e50e7bf25 Fix syntax of cabal v2-install. 2019-09-15 19:40:39 -07:00
John MacFarlane
e367656de8 More GH CI tweaks. 2019-09-15 18:32:12 -07:00
John MacFarlane
4140ad1ac9 GitHub CI: attempt to enable artifact. 2019-09-15 18:20:26 -07:00
John MacFarlane
b023bfccf4 GitHuB CI: remove --disable-optimization and --fast. 2019-09-15 18:12:12 -07:00
John MacFarlane
172c7e3b38 Tweak GitHub CI config. 2019-09-15 18:09:26 -07:00
Albert Krewinkel
d0261d7387 Lua filters: allow passing of HTML-like tables instead of Attr (#5750)
Attr values can now be given as normal Lua tables; this can be used as a
convenient alternative to define Attr values, instead of constructing
values with `pandoc.Attr`. Identifiers are taken from the *id* field,
classes must be given as space separated words in the *class* field. All
remaining fields are included as misc attributes.

With this change, the following lines now create equal elements:

    pandoc.Span('test', {id = 'test', class = 'a b', check = 1})
    pandoc.Span('test', pandoc.Attr('test', {'a','b'}, {check = 1}))

This also works when using the *attr* setter:

    local span = pandoc.Span 'text'
    span.attr = {id = 'test', class = 'a b', check = 1}

Furthermore, the *attributes* field of AST elements can now be a plain
key-value table even when using the `attributes` accessor:

    local span = pandoc.Span 'test'
    span.attributes = {check = 1}   -- works as expected now

Closes: #5744
2019-09-15 12:11:58 -07:00
John MacFarlane
f580da2033 GitHuB CI: turn off optimizations. 2019-09-15 12:10:48 -07:00
John MacFarlane
51728ce36f Added .gitattributes.
This ensures that the golden files in `test/fb2/reader/` don't
have newlines converted. This should fix a test failure on
GitHub CI with Windows.

Closes #5747.
2019-09-15 10:40:59 -07:00
John MacFarlane
45b7636307 Revert "FB2 reader test: better diagnostics on failure."
This reverts commit c65af7d1a2.
2019-09-15 10:27:19 -07:00
John MacFarlane
c65af7d1a2 FB2 reader test: better diagnostics on failure. 2019-09-15 09:06:38 -07:00
John MacFarlane
5d1a58b3d8 Add chapter-title class to EPUB chapter title h1 elements.
See #5269.
2019-09-14 11:44:11 -07:00
John MacFarlane
47358831a4 EPUB toChapters: don't treat "refs" Div specially.
This should make toChapters work better if there are
Divs around sections.
2019-09-14 11:36:21 -07:00
John MacFarlane
3f455aedfa Github CI/windows: separate dependencies step. 2019-09-14 10:47:29 -07:00
John MacFarlane
88a0327579 FB2 reader test: Another attempt to fix test failure on GitHub CI. 2019-09-14 10:37:19 -07:00
John MacFarlane
7ecae69e27 Revert "FB2 reader test: filter CRs."
This reverts commit e35147d715.
2019-09-13 22:08:42 -07:00
John MacFarlane
e35147d715 FB2 reader test: filter CRs.
This may help with the test failure on GitHub CI.

b59e6d0376/checks
2019-09-13 16:50:00 -07:00
John MacFarlane
b59e6d0376 GitHuB CI: Try adding windows build. 2019-09-13 10:54:55 -07:00
John MacFarlane
8984eb7460 Fix setting path. 2019-09-13 09:26:47 -07:00
John MacFarlane
edd7bfa434 GitHub CI - set path. 2019-09-13 09:24:14 -07:00
John MacFarlane
afbc1ca3d8 GitHub CI - try sudo 2019-09-12 23:30:05 -07:00
John MacFarlane
27968fc09d Revert "GitHub CI - try with stack."
This reverts commit 4411af8062.
2019-09-12 23:29:35 -07:00
John MacFarlane
4411af8062 GitHub CI - try with stack. 2019-09-12 23:27:56 -07:00
John MacFarlane
f2612fa1ae GitHUB CI: Try installing recent cabal. 2019-09-12 23:19:32 -07:00
John MacFarlane
ab792faa3a GitHub CI - use plain v1-cabal. 2019-09-12 23:10:20 -07:00
John MacFarlane
8a0ffba296 GitHub CI: try 'cabal new-' instead of 'v2-' 2019-09-12 23:08:05 -07:00
John MacFarlane
69b42255f2
Add haskell.yml
Add GitHub CI file
2019-09-12 23:04:58 -07:00
John MacFarlane
65f73de28a Better message for PandocShouldNeverHappenError. 2019-09-12 08:50:12 -07:00
John MacFarlane
4f909c626c Change exit codes.
It's good practice not to use codes 1-2 for user errors.
Also, we used 65 for two different errors.

- PandocAppError was 1, is now 4
- PandocOptionError was 2, is now 6
- PandocMakePDFError was 65, is now 66
2019-09-12 08:46:38 -07:00
John MacFarlane
5aef7d04f0 MANUAL: add section for exit codes. 2019-09-12 08:36:49 -07:00
John MacFarlane
88dc6fac5d Add --shift-heading-level-by option.
Deprecate --base-heading-level.

The new option does everything the old one does, but also
allows negative shifts.  It also promotes the document
metadata (if not null) to a level-1 heading with a +1 shift,
and demotes an initial level-1 heading to document metadata
with a -1 shift. This supports converting documents that
use an initial level-1 heading for the document title.

Closes #5615.
2019-09-10 23:16:13 -07:00
John MacFarlane
a64b3ab61f Pass value of --dpi to rsvg-convert...
when converting SVG to PDF in the process of creating a PDF.

Closes #5721.
2019-09-10 21:17:51 -07:00
John MacFarlane
4778d03473 LaTeX reader: Fix parsing of optional arguments that contain braced text.
Closes #5740.
2019-09-09 21:33:16 -07:00
John MacFarlane
4dad7c5e86 MANUAL: document some pptx limitations...
in slide show section:

- no incremental display (#5689)
- no pause with `. . .` (#5701)
2019-09-08 22:41:04 -07:00
John MacFarlane
8696725cd9 Add -L option as shortcut for --lua-filter. 2019-09-08 22:37:38 -07:00
Brian Leung
0558ea9836 Org reader: modify handling of example blocks. (#5717)
* Org reader: allow the `-i` switch to ignore leading spaces.

* Org reader: handle awkwardly-aligned code blocks within lists.

Code blocks in Org lists must have their #+BEGIN_ aligned in a
reasonable way, but their other components can be positioned otherwise.
2019-09-08 22:34:10 -07:00
Vanessa McHale
8f5ab97569 Add to other-extensions field for use by cabal solver (#5728) 2019-09-08 22:28:17 -07:00
John MacFarlane
9f984ff26a Replace Element and makeHierarchical with makeSections.
Text.Pandoc.Shared:

+ Remove `Element` type [API change]
+ Remove `makeHierarchicalize` [API change]
+ Add `makeSections` [API change]
+ Export `deLink` [API change]

Now that we have Divs, we can use them to represent the structure
of sections, and we don't need a special Element type.
`makeSections` reorganizes a block list, adding Divs with
class `section` around sections, and adding numbering
if needed.

This change also fixes some longstanding issues recognizing
section structure when the document contains Divs.
Closes #3057, see also #997.

All writers have been changed to use `makeSections`.
Note that in the process we have reverted the change
c1d058aeb1
made in response to #5168, which I'm not completely
sure was a good idea.

Lua modules have also been adjusted accordingly.
Existing lua filters that use `hierarchicalize` will
need to be rewritten to use `make_sections`.
2019-09-08 22:20:19 -07:00
John MacFarlane
1ccff3339d Revert changes to hierarchicalizeWithIds.
Revert "hierarchicalize: ensure that sections get ids..."
This reverts commit 212406a61d.

Revert "Improve detection of headings in Divs by hierarchicalize."
This reverts commit 6e2cfd6c97.

Revert "Shared.hierarchicalize: improve handling of div and section structure."
This reverts commit 345b33762e.
2019-09-08 21:56:42 -07:00