Commit graph

10373 commits

Author SHA1 Message Date
Jesse Rosenthal
145c3f54f9 Powerpoint writer: Add further tests
Tests added for:

 - table of contents
 - endnotes
 - endnotes with table of contents

Powerpoint output checked in MS PowerPoint 2013 (Windows)
2018-01-22 11:52:03 -05:00
Jesse Rosenthal
5cdac2607d Powerpoint writer tests: simplify updating function
We had previously re-read the native file and converted it to
Powerpoint. But we have already done that in constructing the test
archive. So now we just convert the archive back to a bytestring and
write it to disk.
2018-01-22 09:55:41 -05:00
Jesse Rosenthal
0e48c216bc Powerpoint tests: Convert to golden tests
This will allow us to rebuild the pptx files in the test dir more
easily if we make a change in the writer.
2018-01-22 09:14:00 -05: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
Alexander Krotov
b818623d42 Fix Text.Pandoc.Builder link 2018-01-22 15:43:48 +03:00
John MacFarlane
848a3fd528 Delete excess whitespace 2018-01-21 10:21:16 -08: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
John MacFarlane
4423f81079 Require tagsoup 0.14.3 - closes #4282.
This fixes an HTML tokenization bug whereby comments
were sometimes consumed with open tags.
2018-01-21 10:09:27 -08:00
Jesse Rosenthal
54526525bf Powerpoint writer tests: New test framework for pptx.
Previously we had tested certain properties of the output PowerPoint
slides. Corruption, though, comes as the result of a numebr of
interrelated issues in the output pptx archive. This is a new
approach, which compares the output of the Powerpoint writer with
files that we know to (a) not be corrupt, and (b) to show the desired
output behavior (details below). This commit introduces three tests
using the new framework. More will follow.

The test procedure: given a native file and a pptx file, we generate a
pptx archive from the native file, and then test:

1. Whether the same files are in the two archives

2. Whether each of the contained xml files is the same. (We skip time
   entries in `docProps/core.xml`, since these are derived from IO. We
   just check to make sure that they're there in the same way in both
   files.)

3. Whether each of the media files is the same.

Note that steps 2 and 3, though they compare multiple files, are one
test each, since the number of files depends on the input file (if
there is a failure, it will only report the first failed file
comparison in the test failure).
2018-01-21 12:15:35 -05:00
John MacFarlane
3193bf6be7 appveyor - remove -fexternal-interpreter.
This didn't help with the problem #4283.
2018-01-21 08:26:34 -08:00
John MacFarlane
06abfed8e1 appveyor - put comment about cache delete on one line,
so it's easier to copy/paste.
2018-01-21 08:20:39 -08:00
John MacFarlane
3ca3ad8956 Use latest pandoc-citeproc. 2018-01-21 08:20:39 -08: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
5e106ce0b8 More appveyor fixes. 2018-01-20 14:46:47 -08: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
John MacFarlane
e69ca9a070 appveyor - changed syntax for adding ghc-options. 2018-01-20 14:25:24 -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
John MacFarlane
d9dd9beda1 appveyor.yml : use -fexternal-interpreter.
This is supposed to help with the segfaults that come from
use of TH.  See #4021.
2018-01-20 10:38:17 -08:00
Alexander Krotov
98f0e2053e Muse reader: remove multiple descriptions during round-trip tests 2018-01-20 18:34:42 +03: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
Alexander Krotov
e1cc9d9abc Muse reader: enable definition lists in round-trip test 2018-01-20 14:09:44 +03: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
8b3707de04
Merge pull request #4221 from phikal/master
Ms writer: Added papersize variable
2018-01-19 21:37:36 -07: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
John MacFarlane
3eac24c8cf Use latest texmath. 2018-01-19 17:21:40 -08: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
Alexander Krotov
fc5d79b6e9 Muse reader: parse link text without parseFromString 2018-01-19 11:14:15 +03:00
Alexander Krotov
c36c02e58d Muse reader: simplify tableParseCaption 2018-01-19 11:12:19 +03:00
Alexander Krotov
19d2576223 Muse reader: parse definition list terms without parseFromString 2018-01-19 01:50:17 +03:00
Alexander Krotov
7e2c75c865 Muse reader: do not remove trailing whitespace from <code> 2018-01-19 01:50:17 +03:00
Jesse Rosenthal
d0a895acee Powerpoint writer: Implement syntax highlighting
This also necessitated implementing colors and underlining, though
there is currently no way to produce these from markdown. Note that
background colors can't be implemented in PowerPoint, so highlighting
styles that require these will be incomplete.
2018-01-18 17:33:05 -05:00
John MacFarlane
63b10cf157 More stack.yaml fixes for skylighting. 2018-01-18 10:05:41 -08:00
John MacFarlane
e04d648594 Require latest skylighting. 2018-01-18 09:27:00 -08:00
John MacFarlane
aaf2dbf897 Use latest pandoc-citeproc and skylighting. 2018-01-18 09:18:13 -08:00
John MacFarlane
1091614f07 Fixed typo in Makefile. 2018-01-18 09:18:13 -08:00
Jesse Rosenthal
63ae907629 Clean up T.P.W.OOXML file, and add copyright. 2018-01-18 11:49:18 -05:00