summaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAge
* Shorten unbalanced brackets test.John MacFarlane2018-01-14
| | | | It was taking a lot of time.
* LaTeX reader: pass through macro defs in rawLaTeXBlock...John MacFarlane2018-01-13
| | | | | | | | | | even if the `latex_macros` extension is set. This reverts to earlier behavior and is probably safer on the whole, since some macros only modify things in included packages, which pandoc's macro expansion can't modify. Closes #4246.
* data/pandoc.lua: add attr, listAttributes accessorsAlbert Krewinkel2018-01-13
| | | | | | | Elements with attributes got an additional `attr` accessor. Attributes were accessible only via the `identifier`, `classes`, and `attributes`, which was in conflict with the documentation, which indirectly states that such elements have the an `attr` property.
* data/pandoc.lua: accept single block as singleton listAlbert Krewinkel2018-01-13
| | | | | | Every constructor which accepts a list of blocks now also accepts a single block element for convenience. Furthermore, strings are accepted as shorthand for `{pandoc.Str "text"}` in constructors.
* LaTeX reader: allow macro definitions inside macros.John MacFarlane2018-01-13
| | | | | | | | | | | | Previously we went into an infinite loop with ``` \newcommand{\noop}[1]{#1} \noop{\newcommand{\foo}[1]{#1}} \foo{hi} ``` See #4253.
* data/pandoc.lua: accept singleton inline as a listAlbert Krewinkel2018-01-13
| | | | | Every constructor which accepts a list of inlines now also accepts a single inline element for convenience.
* Lua filters: improve error messagesAlbert Krewinkel2018-01-12
| | | | Provide more context about the task which caused an error.
* Lua filters: make PANDOC_READER_OPTIONS availableAlbert Krewinkel2018-01-12
| | | | | The options which were used to read the document are made available to Lua filters via the `PANDOC_READER_OPTIONS` global.
* RST reader: better handling for headers with an anchor.John MacFarlane2018-01-10
| | | | | | Instead of creating a div containing the header, we put the id directly on the header. This way header promotion will work properly. Closes #4240.
* Fixed a test case so it works on windows too.John MacFarlane2018-01-09
|
* HTML writer: Fixed footnote backlinks with --id-prefix.John MacFarlane2018-01-09
| | | | Closes #4235.
* data/pandoc.lua: cleanup code, remove cruftAlbert Krewinkel2018-01-08
|
* Lua: make pandoc-types version available as PANDOC_API_VERSIONAlbert Krewinkel2018-01-07
| | | | | | The current pandoc-types version is made available to Lua programs in the global PANDOC_API_VERSION. It contains the version as a list of numbers.
* Lua: make pandoc version available as PANDOC_VERSIONAlbert Krewinkel2018-01-07
| | | | | The current pandoc version is made available to Lua programs in the global PANDOC_VERSION. It contains the version as a list of numbers.
* Powerpoint writer: Set default slidelevel correctly.Jesse Rosenthal2018-01-03
| | | | | | 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.
* Docx reader: Add tests for paragraph insertion/deletion.Jesse Rosenthal2018-01-02
|
* Docx reader: tests for overlapping targets (anchor spans).Jesse Rosenthal2017-12-31
|
* Docx Reader: Combine adjacent anchors.Jesse Rosenthal2017-12-31
| | | | | | | | | | | | | | 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.
* Docx reader: tests for removing unused anchors.Jesse Rosenthal2017-12-30
|
* Muse reader: enable round trip testAlexander Krotov2017-12-30
| | | | Closes #4107
* Docx reader: Read multiple children of w:sdtContents`Jesse Rosenthal2017-12-30
| | | | | | | | 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.
* Powerpoint Writer tests: Add quickcheck tests for content types.Jesse Rosenthal2017-12-29
| | | | | We want to make sure we always have an override for each xml file in the content types file.
* Powerpoint writer test: more slide number testsJesse Rosenthal2017-12-29
| | | | Add test for custom slide-level header, and notes slides.
* Merge pull request #4170 from oltolm/opendocumentJohn MacFarlane2017-12-28
|\ | | | | improve formatting of formulas in OpenDocument
| * improve formatting of formulas in OpenDocumentoltolm2017-12-28
| |
* | Powerpoint writer tests: use IO.John MacFarlane2017-12-28
| | | | | | | | | | Otherwise we can't find the data files when compiled with -embed_data_files.
* | Use insertInFileTree in powerpoint test.John MacFarlane2017-12-28
| |
* | Text.Pandoc.Class: add insertInFileTree (API change).John MacFarlane2017-12-28
| | | | | | | | | | | | | | 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.
* | Fixed warning in powerpoint writer test.John MacFarlane2017-12-28
| |
* | LaTeX writer: Use \endhead after \toprule in headerless tables.John MacFarlane2017-12-28
| | | | | | | | Closes #4207.
* | LaTeX reader: be more tolerant of `&` character.John MacFarlane2017-12-28
| | | | | | | | | | This allows us to parse unknown tabular environments as raw LaTeX. Closes #4208.
* | PowerPoint writer: Introduce beginning of testsJesse Rosenthal2017-12-28
| | | | | | | | | | | | | | | | | | | | | | 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.
* | Org smart test: drop superfluous importAlbert Krewinkel2017-12-28
| | | | | | | | Keeps GHC 7.8 and GHC 7.10 happy.
* | Org reader: support minlevel option for includesAlbert Krewinkel2017-12-28
| | | | | | | | | | | | | | | | | | 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
* | Break-up org reader test fileAlbert Krewinkel2017-12-28
| | | | | | | | | | | | | | 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.
* | Merge pull request #4184 from mb21/html-reader-figcaptionJohn MacFarlane2017-12-27
|\ \ | | | | | | HTML Reader: be more forgiving about figcaption
| * | HTML Reader: be more forgiving about figcaptionmb212017-12-23
| | | | | | | | | | | | fixes #4183
* | | HTML reader: parse div with class `line-block` as LineBlock.John MacFarlane2017-12-27
| | | | | | | | | | | | See #4162.
* | | Added tests for custom writer.John MacFarlane2017-12-27
| | |
* | | Docx reader: add tests for structured document tags unwrapping.Jesse Rosenthal2017-12-27
| |/ |/|
* | LaTeX reader: support `\foreignlanguage` from babel.John MacFarlane2017-12-26
| |
* | HTML writer: Use br elements in line blocks...John MacFarlane2017-12-26
| | | | | | | | | | | | | | | | 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.
* | RST reader: allow empty list items (as docutils does).John MacFarlane2017-12-24
| | | | | | | | Closes #4193.
* | Lua modules: add function pandoc.utils.hierarchicalizeAlbert Krewinkel2017-12-23
| | | | | | | | Convert list of Pandoc blocks into (hierarchical) list of Elements.
* | JATS reader: process author metadata.John MacFarlane2017-12-23
| |
* | Lua modules: add function pandoc.utils.normalize_dateAlbert Krewinkel2017-12-23
| | | | | | | | | | The function parses a date and converts it (if possible) to "YYYY-MM-DD" format.
* | Lua modules: add function pandoc.utils.to_roman_numeralAlbert Krewinkel2017-12-23
|/ | | | | The function allows conversion of numbers below 4000 into roman numerals.
* `latex_macros` extension changes.John MacFarlane2017-12-22
| | | | | | | | | | | | 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.
* Markdown reader: improved raw tex parsing.John MacFarlane2017-12-22
| | | | | + Preserve original whitespace between blocks. + Recognize `\placeformula` as context.
* Lua modules: add stringify function to pandoc.utilsAlbert Krewinkel2017-12-22
| | | | | The new function `pandoc.utils.stringify` converts any AST element to a string with formatting removed.