aboutsummaryrefslogtreecommitdiff
path: root/test
AgeCommit message (Collapse)AuthorFilesLines
2018-01-18Muse reader: parse "~~" as non-breaking space in Text::Amuse modeAlexander Krotov1-2/+2
Latest Text::Amuse supports "~~"
2018-01-18Muse reader: refactor list parsingAlexander Krotov1-17/+52
Now list item contents is parsed as blocks, without resorting to parseFromString. Only the first line of paragraph has to be indented now, just like in Emacs Muse and Text::Amuse. Definition lists are not refactored yet. See also: issue #3865.
2018-01-17Markdown reader: don't coalesce adjacent raw LaTeX blocks...John MacFarlane2-1/+11
if they are separated by a blank line. See lierdakil/pandoc-crossref#160 for motivation.
2018-01-16Markdown writer: fix cell width calculation.John MacFarlane2-16/+16
Previously we could get ever-lengthening cell widths when a table was run repeatedly through `pandoc -f markdown -t markdown`. This patch stabilizes the relative cell widths. Closes #4265.
2018-01-16Docx reader: Add test for hyperlinks in instrText tagJesse Rosenthal3-0/+5
This is difficult to recreate with a modern version of Word, so I'm using the file submitted with the bug report. It would be preferable to find a smaller example with Latin characters, though, so as not to confuse the issue being tested.
2018-01-15ConTeXt writer: Use xtables instead of Tables (#4223)Henri Menke4-155/+275
- Default to xtables for context output. - Added `ntb` extension (affecting context writer only) to use Natural Tables instead. - Added `Ext_ntb` constructor to `Extension` (API change).
2018-01-14RST reader: add aligned environment when needed in math.John MacFarlane2-1/+13
rst2latex.py uses an align* environment for math in `.. math::` blocks, so this math may contain line breaks. If it does, we put the math in an `aligned` environment to simulate rst2latex.py's behavior. Closes #4254.
2018-01-14Markdown reader: Improved inlinesInBalancedBrackets.John MacFarlane2-1/+7
The change both improves performance and fixes a regression whereby normal citations inside inline notes were not parsed correctly. Closes jgm/pandoc-citeproc#315.
2018-01-14Shorten unbalanced brackets test.John MacFarlane1-1/+1
It was taking a lot of time.
2018-01-13LaTeX reader: pass through macro defs in rawLaTeXBlock...John MacFarlane3-1/+6
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.
2018-01-13data/pandoc.lua: add attr, listAttributes accessorsAlbert Krewinkel1-2/+9
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.
2018-01-13data/pandoc.lua: accept single block as singleton listAlbert Krewinkel1-4/+14
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.
2018-01-13LaTeX reader: allow macro definitions inside macros.John MacFarlane1-0/+8
Previously we went into an infinite loop with ``` \newcommand{\noop}[1]{#1} \noop{\newcommand{\foo}[1]{#1}} \foo{hi} ``` See #4253.
2018-01-13data/pandoc.lua: accept singleton inline as a listAlbert Krewinkel1-1/+6
Every constructor which accepts a list of inlines now also accepts a single inline element for convenience.
2018-01-12Lua filters: improve error messagesAlbert Krewinkel1-0/+10
Provide more context about the task which caused an error.
2018-01-12Lua filters: make PANDOC_READER_OPTIONS availableAlbert Krewinkel1-1/+2
The options which were used to read the document are made available to Lua filters via the `PANDOC_READER_OPTIONS` global.
2018-01-10RST reader: better handling for headers with an anchor.John MacFarlane1-0/+33
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.
2018-01-09Fixed a test case so it works on windows too.John MacFarlane1-1/+1
2018-01-09HTML writer: Fixed footnote backlinks with --id-prefix.John MacFarlane1-0/+12
Closes #4235.
2018-01-08data/pandoc.lua: cleanup code, remove cruftAlbert Krewinkel1-2/+2
2018-01-07Lua: make pandoc-types version available as PANDOC_API_VERSIONAlbert Krewinkel1-1/+8
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.
2018-01-07Lua: make pandoc version available as PANDOC_VERSIONAlbert Krewinkel1-13/+25
The current pandoc version is made available to Lua programs in the global PANDOC_VERSION. It contains the version as a list of numbers.
2018-01-03Powerpoint writer: Set default slidelevel correctly.Jesse Rosenthal1-1/+1
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 Rosenthal5-0/+19
2017-12-31Docx reader: tests for overlapping targets (anchor spans).Jesse Rosenthal3-0/+7
2017-12-31Docx Reader: Combine adjacent anchors.Jesse Rosenthal1-2/+2
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 Rosenthal3-0/+7
2017-12-30Muse reader: enable round trip testAlexander Krotov1-10/+9
Closes #4107
2017-12-30Docx reader: Read multiple children of w:sdtContents`Jesse Rosenthal1-1/+6
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 Rosenthal1-14/+77
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 Rosenthal1-4/+9
Add test for custom slide-level header, and notes slides.
2017-12-28Merge pull request #4170 from oltolm/opendocumentJohn MacFarlane1-0/+2
improve formatting of formulas in OpenDocument
2017-12-28improve formatting of formulas in OpenDocumentoltolm1-0/+2
2017-12-28Powerpoint writer tests: use IO.John MacFarlane2-336/+18
Otherwise we can't find the data files when compiled with -embed_data_files.
2017-12-28Use insertInFileTree in powerpoint test.John MacFarlane1-2/+1
2017-12-28Text.Pandoc.Class: add insertInFileTree (API change).John MacFarlane1-7/+2
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 MacFarlane1-3/+0
2017-12-28LaTeX writer: Use \endhead after \toprule in headerless tables.John MacFarlane1-0/+2
Closes #4207.
2017-12-28LaTeX reader: be more tolerant of `&` character.John MacFarlane1-0/+18
This allows us to parse unknown tabular environments as raw LaTeX. Closes #4208.
2017-12-28PowerPoint writer: Introduce beginning of testsJesse Rosenthal3-0/+425
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 Krewinkel1-1/+1
Keeps GHC 7.8 and GHC 7.10 happy.
2017-12-28Org reader: support minlevel option for includesAlbert Krewinkel1-1/+77
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 Krewinkel13-1864/+2007
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 MacFarlane1-0/+32
HTML Reader: be more forgiving about figcaption
2017-12-27HTML reader: parse div with class `line-block` as LineBlock.John MacFarlane1-0/+10
See #4162.
2017-12-27Added tests for custom writer.John MacFarlane3-0/+990
2017-12-27Docx reader: add tests for structured document tags unwrapping.Jesse Rosenthal3-0/+14
2017-12-26LaTeX reader: support `\foreignlanguage` from babel.John MacFarlane1-0/+6
2017-12-26HTML writer: Use br elements in line blocks...John MacFarlane7-7/+0
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 MacFarlane1-0/+10
Closes #4193.