Alexander Krotov
1a06f0ecfb
Muse reader: make block parsers responsible for parsing newline
...
Block parsers must always stop after newline or at the end of file.
2018-02-05 01:44:31 +03:00
Alexander Krotov
ca4a61a348
Muse reader: simplify listItemContents' with sepBy1
2018-02-04 19:19:55 +03:00
John MacFarlane
5439e29dd9
C -> c.
2018-02-03 11:22:25 -08:00
Alexander Krotov
d777fe8bbe
Muse writer: write image width specified in percent in Text::Amuse mode
2018-02-03 18:36:38 +03:00
John MacFarlane
eeafb3fa77
Determine image size for PDFs.
...
Closes #4322 .
2018-02-02 10:00:14 -08:00
John MacFarlane
8bdbdc24de
TEI writer: Use height instead of depth for images.
...
Closes #4331 .
2018-02-01 11:38:33 -08:00
Alexander Krotov
00b7ab8d00
Muse reader: replace ParserState with MuseState
2018-01-31 01:38:42 +03:00
Alexander Krotov
309595aff3
Export list marker parsers from Text.Pandoc.Parsing
2018-01-31 01:33:11 +03:00
Alexander Krotov
9ff8bc64f9
Muse writer: don't wrap displayMath into <verse>
...
<verse> is a block tag and displayMath is an inline element.
Writing <verse> around displayMath could result in nested
<verse> tags.
2018-01-30 00:33:02 +03:00
Alexander Krotov
b7d8930dc0
Muse writer: escape nonbreaking space ("~~")
2018-01-29 12:54:43 +03:00
Alexander Krotov
37271fabee
Muse reader: simplify block tag parsing code
2018-01-29 12:07:40 +03:00
Alexander Krotov
ff31602267
Muse reader: parse inline <literal> without parseFromString
2018-01-29 04:58:43 +03:00
Alexander Krotov
60b2863e90
Muse reader: parse <comment> and <verbatim> without parseFromString
2018-01-29 04:52:51 +03:00
Alexander Krotov
264a25e5e9
Muse reader: parse verse tag contents without parseFromString
2018-01-28 22:09:47 +03:00
Alexander Krotov
05275be2cb
Muse reader: make verseLine return Inlines, not String
2018-01-28 08:49:55 +03:00
Alexander Krotov
4bfab8f04c
Muse reader: parse directives without parseFromString
2018-01-28 07:51:38 +03:00
Alexander Krotov
248f6076bc
Muse reader: fix parsing of trailing whitespace
...
Newline after whitespace now results in softbreak
instead of space.
2018-01-28 03:18:29 +03:00
Alexander Krotov
75762ee0dc
Muse reader: simplify paragraph parsing
...
Blank lines are already handled by blockElements.
2018-01-28 02:32:41 +03:00
Jesse Rosenthal
9cf9f1f89d
Docx writer: make more deterministic to facilitate testing
...
This will allow us to compare files directly in a golden test. Times
are still based on IO, but we will be able to safely skip those.
Changes:
- `getUniqueId` now calls to the state to get an incremented digit,
instead of calling to P.uniqueHash.
- we always start the PRNG in mkNumbering/mkAbstractNum with the same
seed (1848), so our randoms should be the same each time.
2018-01-27 07:44:53 -05:00
Jesse Rosenthal
ae2157fe8b
Docx writer: Fix ids in comment writing
...
Comments from `--track-changes=all` were producing corrupt docx,
because the writer was trying to get id from the `(ID,_,_)` field of
the attributes, and ignoring the "id" entry in the key-value pairs. We
now check both.
There is a larger conversation to be had about the right way to treat
"id" and "class" entries in kvs, but this fix will correctly interpret
the output of the docx reader work.
2018-01-27 07:41:55 -05:00
Henri Menke
751b5ad010
ConTeXt writer: new section syntax and --section-divs ( #4295 )
...
Fixes #2609 .
This PR introduces the new-style section headings: `\section[my-header]{My Header}` -> `\section[title={My Header},reference={my-header}]`.
On top of this, the ConTeXt writer now supports the `--section-divs` option to write sections in the fenced style, with `\startsection` and `\stopsection`.
2018-01-25 11:56:28 -08:00
Jesse Rosenthal
0d7aedca58
Dock writer: Fix deletion track changes
...
This had been mistakenly written as a second insertion function.
Closes : #4303
2018-01-25 10:42:01 -05:00
Alexander Krotov
6337539e32
Muse reader: fix matching of closing inline tags
2018-01-24 14:16:56 +03:00
Alexander Krotov
763126dae0
Muse reader: remove block
function
2018-01-24 13:58:43 +03:00
Albert Krewinkel
517f65a7cc
Lua filters: store constructors in registry
...
Lua functions used to construct AST element values are stored in the Lua
registry for quicker access. Getting a value from the registry is much
faster than getting a global value (partly to idiosyncrasies of hslua);
this change results in a considerable performance boost.
2018-01-23 21:29:58 +01:00
Albert Krewinkel
2e0bb77334
Lua: move getTag from StackInstances to Util
...
Change: minor
2018-01-23 21:29:52 +01:00
Henri Menke
71bbadb793
ConTeXt writer: xtables: correct wrong usage of caption
2018-01-23 09:15:59 +13:00
Alexander Krotov
e9ed4832ed
Muse writer: join code with different attributes during normalization
2018-01-22 16:27:14 +03:00
Alexander Krotov
288065cfd4
Muse writer: indent lists inside Div
2018-01-22 16:24:44 +03:00
John MacFarlane
e9aadc1cfa
Merge pull request #4237 from sitewisely/header_and_footer
...
Add header and footer parameters for wkhtmltopdf
2018-01-21 11:18:44 -07:00
Alexander Krotov
91bca73266
Muse reader: embed parseBlocks into parseMuse
2018-01-21 03:26:54 +03:00
Alexander Krotov
eaebc5fd19
Muse reader: make listItem generic
2018-01-21 03:26:54 +03:00
John MacFarlane
ac08a887cf
Markdown reader: Fix parsing bug with nested fenced divs.
...
Closes #4281 .
Previously we allowed "nonindent spaces" before the
opening and closing `:::`, but this interfered with
list parsing, so now we require the fences to be
flush with the margin of the containing block.
2018-01-20 14:44:08 -08:00
Alexander Krotov
1dd5018a80
Muse reader: simplify paragraph parsing
...
Blanklines are already consumed during block parsing,
there is no need to check for them specifically.
2018-01-21 00:49:43 +03:00
John MacFarlane
957c0e110d
RST reader: fix parsing of headers with trailing space.
...
This was a regression in pandoc 2.0.
Closes #4280 .
2018-01-20 11:10:09 -08:00
Jesse Rosenthal
fa912bb15e
Docx reader: Use already imported operator
...
This fixes an import error in the last commit.
2018-01-20 09:49:45 -05:00
Jesse Rosenthal
736c2c554f
Docx reader: small change to Fields hyperlink parser
...
Previously, unquoted string required a space at the end of the
line (and consumed it). Now we either take a space (and don't consume
it), or end of input.
2018-01-20 09:40:07 -05:00
John MacFarlane
8ffb4e5b33
Conditional import to avoid warning.
2018-01-19 22:46:29 -08:00
John MacFarlane
b8ffd834cf
hlint code improvements.
2018-01-19 21:25:24 -08:00
John MacFarlane
46cd6429d8
Merge pull request #4259 from italia/4248
...
in RST writer insert comment between lists and quotes, closes #4248
2018-01-19 18:33:07 -07:00
Alexander Krotov
22b69b557e
Muse reader: fix parsing of nested definition lists
2018-01-20 02:14:27 +03:00
John MacFarlane
62c395dafa
LaTeX reader: fixed parsing of tabular* environment.
...
This was just a typo in the source.
Closes #4279 .
2018-01-19 11:39:27 -08:00
Alexander Krotov
f019d3cc45
Muse reader: remove duplicate variable in definitionListItem
2018-01-19 19:33:11 +03:00
danse
a0ee842096
remove blockToRST'
moving its logic into fixBlocks
2018-01-19 16:34:37 +01:00
danse
2165efef7e
in RST writer insert comment between lists and quotes, closes #4248
2018-01-19 15:57:54 +01:00
Alexander Krotov
01499b766b
Muse writer: support definitions with multiple descriptions
...
Muse reader does not support this syntax yet, but Emacs Muse parses
it correctly.
2018-01-19 15:00:00 +03:00
Alexander Krotov
7680e9b964
Muse reader: require only one space for nested definition list indentation
2018-01-19 14:16:20 +03:00
Alexander Krotov
4a5801b823
Muse reader: parse verse without parseFromString
2018-01-19 12:12:06 +03:00
Alexander Krotov
4d3f787d63
Muse reader: remove commented out code
2018-01-19 11:36:57 +03:00
Alexander Krotov
9e21ae15e1
Muse reader: parse Emacs Muse directives without parseFromString
...
Also require space (not newline) after directive name.
2018-01-19 11:29:11 +03:00