summaryrefslogtreecommitdiff
path: root/test
AgeCommit message (Collapse)Author
2018-01-03Powerpoint writer: Set default slidelevel correctly.Jesse Rosenthal
We had previously defaulted to slideLevel 2. Now we use the correct behavior of defaulting to the highest level header followed by content. We change an expected test result to match this behavior.
2018-01-02Docx reader: Add tests for paragraph insertion/deletion.Jesse Rosenthal
2017-12-31Docx reader: tests for overlapping targets (anchor spans).Jesse Rosenthal
2017-12-31Docx Reader: Combine adjacent anchors.Jesse Rosenthal
There isn't any reason to have numberous anchors in the same place, since we can't maintain docx's non-nesting overlapping. So we reduce to a single anchor, and have all links pointing to one of the overlapping anchors point to that one. This changes the behavior from commit e90c714c7 slightly (use the first anchor instead of the last) so we change the expected test result. Note that because this produces a state that has to be set after every invocation of `parPartToInlines`, we make the main function into a primed subfunction `parPartToInlines'`, and make `parPartToInlines` a wrapper around that.
2017-12-30Docx reader: tests for removing unused anchors.Jesse Rosenthal
2017-12-30Muse reader: enable round trip testAlexander Krotov
Closes #4107
2017-12-30Docx reader: Read multiple children of w:sdtContents`Jesse Rosenthal
Previously we had only read the first child of an sdtContents tag. Now we replace sdt with all children of the sdtContents tag. This changes the expected test result of our nested_anchors test, since now we read docx's generated TOCs.
2017-12-29Powerpoint Writer tests: Add quickcheck tests for content types.Jesse Rosenthal
We want to make sure we always have an override for each xml file in the content types file.
2017-12-29Powerpoint writer test: more slide number testsJesse Rosenthal
Add test for custom slide-level header, and notes slides.
2017-12-28Merge pull request #4170 from oltolm/opendocumentJohn MacFarlane
improve formatting of formulas in OpenDocument
2017-12-28improve formatting of formulas in OpenDocumentoltolm
2017-12-28Powerpoint writer tests: use IO.John MacFarlane
Otherwise we can't find the data files when compiled with -embed_data_files.
2017-12-28Use insertInFileTree in powerpoint test.John MacFarlane
2017-12-28Text.Pandoc.Class: add insertInFileTree (API change).John MacFarlane
This gives a pure way to insert an ersatz file into a FileTree. In addition, we normalize paths both on insertion and on lookup, so that "foo" and "./foo" will be judged equivalent.
2017-12-28Fixed warning in powerpoint writer test.John MacFarlane
2017-12-28LaTeX writer: Use \endhead after \toprule in headerless tables.John MacFarlane
Closes #4207.
2017-12-28LaTeX reader: be more tolerant of `&` character.John MacFarlane
This allows us to parse unknown tabular environments as raw LaTeX. Closes #4208.
2017-12-28PowerPoint writer: Introduce beginning of testsJesse Rosenthal
This is the beginning of a test suite for the powerpoint writer. Initial tests are for the number of slides. Note that at the moment it does not test against corruption in Microsoft PowerPoint; it just tests that certain outcomes work as expected. More tests will be added. This test framework uses the PandocPure monad introduced with Pandoc 2.0.
2017-12-28Org smart test: drop superfluous importAlbert Krewinkel
Keeps GHC 7.8 and GHC 7.10 happy.
2017-12-28Org reader: support minlevel option for includesAlbert Krewinkel
The level of headers in included files can be shifted to a higher level by specifying a minimum header level via the `:minlevel` parameter. E.g. `#+include: "tour.org" :minlevel 1` will shift the headers in tour.org such that the topmost headers become level 1 headers. Fixes: #4154
2017-12-28Break-up org reader test fileAlbert Krewinkel
The org reader test file had grown large, to the point that editor performance was negatively affected in some cases. The tests are spread over multiple submodules, and re-combined into a tasty TestTree in the main org reader test file.
2017-12-27Merge pull request #4184 from mb21/html-reader-figcaptionJohn MacFarlane
HTML Reader: be more forgiving about figcaption
2017-12-27HTML reader: parse div with class `line-block` as LineBlock.John MacFarlane
See #4162.
2017-12-27Added tests for custom writer.John MacFarlane
2017-12-27Docx reader: add tests for structured document tags unwrapping.Jesse Rosenthal
2017-12-26LaTeX reader: support `\foreignlanguage` from babel.John MacFarlane
2017-12-26HTML writer: Use br elements in line blocks...John MacFarlane
instead of relying on CSS. Closes #4162. HTML-based templates have had the custom CSS for div.line-block removed. Those maintaining custom templates will want to remove this too. We still enclose line blocks in a div with class line-block.
2017-12-24RST reader: allow empty list items (as docutils does).John MacFarlane
Closes #4193.
2017-12-23Lua modules: add function pandoc.utils.hierarchicalizeAlbert Krewinkel
Convert list of Pandoc blocks into (hierarchical) list of Elements.
2017-12-23JATS reader: process author metadata.John MacFarlane
2017-12-23Lua modules: add function pandoc.utils.normalize_dateAlbert Krewinkel
The function parses a date and converts it (if possible) to "YYYY-MM-DD" format.
2017-12-23Lua modules: add function pandoc.utils.to_roman_numeralAlbert Krewinkel
The function allows conversion of numbers below 4000 into roman numerals.
2017-12-23HTML Reader: be more forgiving about figcaptionmb21
fixes #4183
2017-12-22`latex_macros` extension changes.John MacFarlane
Don't pass through macro definitions themselves when `latex_macros` is set. The macros have already been applied. If `latex_macros` is enabled, then `rawLaTeXBlock` in Text.Pandoc.Readers.LaTeX will succeed in parsing a macro definition, and will update pandoc's internal macro map accordingly, but the empty string will be returned. Together with earlier changes, this closes #4179.
2017-12-22Markdown reader: improved raw tex parsing.John MacFarlane
+ Preserve original whitespace between blocks. + Recognize `\placeformula` as context.
2017-12-22Lua modules: add stringify function to pandoc.utilsAlbert Krewinkel
The new function `pandoc.utils.stringify` converts any AST element to a string with formatting removed.
2017-12-22RST writer: fix anchors for headers.John MacFarlane
We were missing an `_`. See #4188.
2017-12-21Merge pull request #4177 from stencila/jats-xml-readerJohn MacFarlane
Add Basic JATS reader based on DocBook reader
2017-12-21JATS writer: Make <p> optional in <td> and <th> (#4178)Hamish Mackenzie
If the contents are single `Plain` block then do not wrap them with a <p> element.
2017-12-22Improve support for code language in JATSHamish Mackenzie
2017-12-21Org writer: do not wrap "-" to avoid accidental bullet listsAlexander Krotov
Also add TODO for ordered lists.
2017-12-21Muse reader: parse anchors immediately after headings as IDsAlexander Krotov
2017-12-20Test more pandoc Lua module functionsAlbert Krewinkel
The functions `sha1`, `read`, and `pipe` are now tested. Change: minor
2017-12-20Muse reader: require that note references does not start with 0Alexander Krotov
2017-12-20Add Basic JATS reader based on DocBook readerHamish Mackenzie
2017-12-19Muse writer: don't wrap note references to the next lineAlexander Krotov
Closes #4172.
2017-12-19Fix for #4171 fix: don't wrap note references after SoftBreakAlexander Krotov
2017-12-19Muse reader: parse empty comments correctlyAlexander Krotov
2017-12-18Org writer: don't allow fn refs to wrap to beginning of line.John MacFarlane
Otherwise they can be interpreted as footnote definitions. Closes #4171.
2017-12-17OPML reader: enable raw HTML and other extensions by default for notes.John MacFarlane
This fixes a regression in 2.0. Note that extensions can now be individually disabled, e.g. `-f opml-smart-raw_html`. Closes #4164.