Commit Graph
13225 Commits
Author SHA1 Message Date
Albert Krewinkel f1bd06eb4a Lua: support new tables 2020-04-15 23:03:22 -04:00
despresc 2fc11f3b1e Modify toLegacyTable to cut up cells, add tests
Now a cell with dimension (h, w) will be cut up into h*w cells of
dimension (1,1), all in the same grid position, with the upper-left
holding the original cell contents and the rest being empty.
2020-04-15 23:03:22 -04:00
despresc c7814f31e1 Use the new builders, modify readers to preserve empty headers
The Builder.simpleTable now only adds a row to the TableHead when the
given header row is not null. This uncovered an inconsistency in the
readers: some would unconditionally emit a header filled with empty
cells, even if the header was not present. Now every reader has the
conditional behaviour. Only the XWiki writer depended on the header
row being always present; it now pads its head as necessary.
2020-04-15 23:03:22 -04:00
despresc d368536a4e Adapt to the removal of the RowSpan, ColSpan, RowHeadColumns accessors 2020-04-15 23:03:22 -04:00
despresc 4e34d366df Adapt to the newest Table type, fix some previous adaptation issues
- Writers.Native is now adapted to the new Table type.

- Inline captions should now be conditionally wrapped in a Plain, not
  a Para block.

- The toLegacyTable function now lives in Writers.Shared.
2020-04-15 23:03:22 -04:00
despresc f8ce38975b Remove the onlySimpleCellBodies function from Shared 2020-04-15 23:03:22 -04:00
despresc 7254a2ae0b Implement the new Table type 2020-04-15 23:03:22 -04:00
Nikolay Yakimov 83c1ce1d77 Markdown Reader: Fix inline code in lists (#6284)
Closes #6284.

Previously inline code containing list markers was sometimes parsed incorrectly.
2020-04-15 16:20:01 -07:00
John MacFarlane b64ece76cb nightly build: print ghc, cabal versions for diagnostics. 2020-04-15 10:41:47 -07:00
John MacFarlane f429863271 Use ghc 8.8.1 for nightly linux build. 2020-04-15 09:43:18 -07:00
John MacFarlane 71c4857464 JATS reader: handle "label" element in section title.
Closes #6288.
2020-04-15 09:23:04 -07:00
John MacFarlane 20c1c297b2 Improve linux CI caching. 2020-04-13 23:04:23 -07:00
34775b4128 Add an option to disable certificate validation (#6156)
This commit adds the option `--no-check-certificate`, which disables certificate
checking when resources are fetched by HTTP.

Co-authored-by: Cécile Chemin <cecile.chemin@insee.fr>
Co-authored-by: Juliette Fourcot <juliette.fourcot@insee.fr>
2020-04-13 14:58:42 -07:00
John MacFarlane 21b1358a52 Whitespace change to cabal.project...
to invalidate cache.
2020-04-12 22:27:54 -07:00
John MacFarlane 58cd731e51 Require doctemplates 0.8.2. 2020-04-12 22:25:31 -07:00
John MacFarlane c1f5f3fa67 Improve linux caching for ci. 2020-04-12 22:17:50 -07:00
John MacFarlane acb542df98 Add caching to linux ci. 2020-04-12 21:53:38 -07:00
John MacFarlane 984a06dc29 Add caching for Windows stack CI. 2020-04-12 15:52:14 -07:00
John MacFarlane e05d0a627a Add caching for macOS CI build. 2020-04-12 15:27:30 -07:00
John MacFarlane bf583c3d9c RST reader: handle "date::" directive.
Closes #6276.
2020-04-12 10:32:38 -07:00
John MacFarlane 9187b4bca9 LaTeX writer: ensure that -M csquotes works even in fragment mode.
Closes #6265.
2020-04-11 10:40:59 -07:00
Tristan de Cacqueray dd06d63540 HTML reader: support <bdo> (#6271)
See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/bdo

Closes #5794
2020-04-11 09:57:59 -07:00
Mauro Bieg 61f666a88f MANUAL: add link to print-css.rocks (#6272) 2020-04-11 09:49:36 -07:00
John MacFarlane c49061e99b Clarify docs for pipe table column width adjustment.
See #6254.
2020-04-09 09:35:27 -07:00
Albert Krewinkel c09a3448d1 Jira reader: improve icon conversion
Icons are now converted as follows: `(/)` to ✔, `(x)` to , `(!)` to
, `(+)` to , `(-)` to , `(off)` to 🌙, and `(*)` to ☆. The new
icons render well in most fonts. Furthermore, the UTF-8 characters all
fit into 4-bytes.

Closes: #6264
2020-04-09 16:21:45 +02:00
John MacFarlane 11df2a3c0f LaTeX reader: better handling of \lettrine.
- SmallCaps instead of Span for the part after the initial capital.
- Ensure that both arguments are parsed, so that in Markdown both
  are treated as raw LateX. (Closes #6258.)
2020-04-07 09:25:52 -07:00
John MacFarlane 39b742e5ba Fix ATX header syntax in manual 2020-04-07 08:54:18 -07:00
John MacFarlane 3f7f741297 Allow haddock-library 1.9.x. 2020-04-06 21:01:04 -07:00
Vlad Hanciuta 8dbd4938f2 Vimwiki reader: Add nested syntax highlighting (#6257)
Nested syntaxes are specified like this:
{{{sql
SELECT * FROM table
}}}

The preformatted code block parser has been extended to check if the
first attribute of the block is not a `key=value` pair, and in that case
it will be considered as a class.

Closes #6256.
2020-04-06 16:41:28 -07:00
Albert Krewinkel 663a5a9b7f test/writer.jira: fix links, skip alias if it equals the target 2020-04-04 15:03:13 +02:00
Albert Krewinkel c3f539364a Jira: support citations, attachment links, and user links
Closes: #6231
Closes: #6238
Closes: #6239
2020-04-04 14:27:27 +02:00
Albert Krewinkel d867cac8ca Jira reader: resolve parsing issues of blockquote, color
Parsing problems occurring with block quotes and colored text have been
resolved.

Fixes: #6233
Fixes: #6235
2020-04-03 13:25:52 +02:00
John MacFarlane 792f1a6b57 HTML reader: fix parsing unclosed th elements in a table.
Closes #6247.
2020-04-02 07:58:52 -07:00
John MacFarlane 92e0801daa Add test fixes for docbook writer changes. 2020-04-01 23:09:14 -07:00
John MacFarlane 8ec3f6fc46 Docbook writer: Add personname element to docbook author.
Closes #6244.
2020-04-01 09:05:13 -07:00
Felix Yan f6615ad85e Allow hslua 1.1 (#6243)
Builds fine and all tests pass.
2020-04-01 08:52:14 -07:00
Levi Gruspe e04ac2a093 Fix description of BulletList Lua type
Change description of BulletList parameter from 'List of Blocks' to 'List of List of Blocks'.
2020-04-01 13:16:41 +02:00
John MacFarlane 247d8e8001 Markdown writer: ensure consistent padding for pipe tables.
Previously there was no space between text and bar in right-aligned
table cells.

This commit also ensures space on both sides for centered cells.

Closes #6240.
2020-03-31 22:34:00 -07:00
Albert Krewinkel 7df0710094 Jira reader: use span with class underline for inserted text
Jira text which is marked as `+inserted+` is converted into pandoc's
default representation for underlined text: a span with class
`underline`. Previously, the span was marked with the non-standard class
`inserted`.

Closes: #6237
2020-03-31 10:04:55 +02:00
Albert Krewinkel ff9be6b384 Jira writer: convert spans with class underline to inserted text
Spans with class `underline` as converted into Jira text marked as
`+inserted+`, i.e. surrounded by plus-signs.
2020-03-31 09:57:59 +02:00
Albert Krewinkel 9a42bec7fc Jira writer tests: update image in test/writer.jira 2020-03-31 08:18:41 +02:00
Albert Krewinkel e8e6c82aae Jira writer: add image attributes
Image attributes are added to the output as image parameters. If the
image has a class "thumbnail", then a thumbnail image is generated; all
other attributes are discarded in this case.

Closes: #6234
2020-03-30 22:21:29 +02:00
Albert Krewinkel 69a3fa5708 Jira reader: retain image attributes
Jira images attributes as in `!image.jpg|align=right!` are retained as
key-value pairs. Thumbnail images, such as `!example.gif|thumbnail!`,
are marked by a `thumbnail` class in their attributes.

Related to #6234.
2020-03-30 22:03:52 +02:00
Albert Krewinkel 0069773364 Jira reader: read (?) icon as "small questionmark" character
Closes: #6236
2020-03-30 21:34:25 +02:00
Joseph C. Sible 4f41ac3269 Fix #6228 (#6230)
UUID: Remove `getUUID`, fix `getRandomUUID` and make it polymorphic in PandocMonad.
2020-03-30 12:03:29 -07:00
Joseph C. Sible a465e2c059 Clean up and simplify Text.Pandoc.Readers.Docx (#6225)
* Simplify resolveDependentRunStyle

* Simplify runToInlines

* Simplify isAnchorSpan

* Simplify parStyleToTransform

* Only call getStyleName once

* Simplify ils''

* Use case matching to simplify bodyPartToBlocks

* Simplify key expiration
2020-03-29 21:24:42 -07:00
Joseph C. Sible 693159bf38 Clean up and simplify Text.Pandoc.Writers.Docx (#6229)
* Use <|> to simplify the Semigroup instance

* Use map instead of reimplementing it

* Simplify isValidChar

* Remove an unnecessary nested do block

* Simplify pgContentWidth

* Simplify addLang

* Simplify newStyles

* Avoid an unnecessary fmap in headerFooterEntries

* Remove unnecessary monadicity from mkNumbering and mkAbstractNum

* Use randomRs instead of constantly messing with the RNG state

* Lift common functions out of ifs

* Hoist not

* Clarify withTextPropM and withParaPropM
2020-03-29 21:18:31 -07:00
Joseph C. Sible 377efd0ce7 Clean up some fmaps (#6226)
* Avoid fmapping when we're just binding right after anyway

* Clean up unnecessary fmaps in the LaTeX reader
2020-03-29 21:11:05 -07:00
Joseph C. Sible 40fd20d43f Split the RNG so they don't end up equal again after 1 call to next (#6227) 2020-03-29 21:10:50 -07:00
John MacFarlane c12bf49e59 Docx reader: better error messages.
Distinguish between docx parsing and docx container
unpacking errors.
2020-03-29 10:59:18 -07:00