aboutsummaryrefslogtreecommitdiff
path: root/test
AgeCommit message (Collapse)AuthorFilesLines
2019-05-29HTML reader: misc. epub related fixes.John MacFarlane1-890/+887
- With epub extensions, check for epub:type in addition to type. - Fix problem with noteref parsing which caused block-level content to be eaten with the noteref. - Rename pAnyTag to pAny. - Refactor note resolution.
2019-05-29Lua: add Version type to simplify comparisonsAlbert Krewinkel4-9/+119
Version specifiers like `PANDOC_VERSION` and `PANDOC_API_VERSION` are turned into `Version` objects. The objects simplify version-appropriate comparisons while maintaining backward-compatibility. A function `pandoc.types.Version` is added as part of the newly introduced module `pandoc.types`, allowing users to create version objects in scripts.
2019-05-29HTML writer: output video and audio elementsmb216-5/+24
depending on file extension of the image path
2019-05-28Remove command test for #5517.John MacFarlane1-32/+0
We need a better test that works cross-platform. Until then, removing this. Closes #5528.
2019-05-28HTML writer: emit empty alt tag in figures (#5518)Mauro Bieg5-7/+7
The same text is already in the <figcaption> and screen-readers would read it twice, see #4737
2019-05-28Add test for relative file: URI to #5517.John MacFarlane1-0/+6
2019-05-28Fix handling of `file:` URL scheme in `downloadOrRead` (#5522)Mauro Bieg1-0/+26
Move up the pattern match to be reachable, closes #5517. Previously `file:/` URLs were handled wrongly and pandoc attempted to make HTTP requests, which failed.
2019-05-27Use skylighting 0.8.John MacFarlane2-28/+32
2019-05-27consolidate simple-table detection (#5524)Mauro Bieg1-1/+1
add `onlySimpleTableCells` to `Text.Pandoc.Shared` [API change] This fixes an inconsistency in the HTML reader, which did not treat tables with `<p>` inside cells as simple.
2019-05-25Muse reader: allow images inside link descriptionsAlexander Krotov1-0/+3
2019-05-25HTML reader: trim definition list termsAlexander Krotov1-0/+17
2019-05-25Muse writer: do not escape empty line after <br>Alexander Krotov1-0/+1
2019-05-22Markdown writer: Ensure the code fence is long enough.John MacFarlane1-0/+14
Previously too few backticks were used when the code block contained an indented line of backticks. (Ditto tildes.) Cloess #5519.
2019-05-21Markdown writer: Handle labels with integer namesJesse Rosenthal1-0/+18
Previously if labels had integer names, it could produce a conflict with auto-labeled reference links. Now we test for a conflict and find the next available integer. Note that this involves adding a new state variable `stPrevRefs` to keep track of refs used in other document parts when using `--reference-location=block|section` Closes #5495
2019-05-20Improve output of Lua tests (#5499)Albert Krewinkel6-165/+196
This makes use of tasty-lua, a package to write tests in Lua and integrate the results into Tasty output. Test output becomes more informative: individual tests and test groups become visible in test output. Failures are reported with helpful error messages.
2019-05-16JATS writer: properly handle footnotes.John MacFarlane2-24/+32
"Best Practice: When footnotes are grouped at the end of an article, wrap them in a `<fn-group>` and use an `<xref>` element in the text, as usual, to tie each footnote in the list to a particular location in the text." Closes #5511.
2019-05-15FB2 writer: do not wrap note references into <sup> and bracketsAlexander Krotov2-17/+5
Existing FB2 readers, such as FBReader, already display links with type="note" as a superscript.
2019-05-13Org reader: fix planning elements in headers level 3 and higherAlbert Krewinkel1-0/+24
Planning info is now always placed before the subtree contents. Previously, the planning info was placed after the content if the header's subtree was converted to a list, which happens with headers of level 3 and higher per default. Fixes: #5494
2019-05-13Org reader: omit, but warn about unknown export optionsAlbert Krewinkel1-0/+18
Unknown export options are properly ignored and omitted from the output.
2019-05-12add test/tables.xwiki to git and pandoc.cabal (#5498)Mauro Bieg1-0/+46
2019-05-12Org writer: always indent src blocks content by 2 spacesAlbert Krewinkel2-26/+26
Emacs always uses two spaces when indenting the content of src blocks, e.g., when exiting a `C-c '` edit-buffer. Pandoc used to indent contents by the space-equivalent of one tab, but now always uses two spaces, too. Closes: #5440
2019-05-11FB2 reader: add notes parsing testAlexander Krotov3-0/+24
2019-05-05Asciidoc writer: use `` `+...+` `` form for inline code.John MacFarlane2-13/+13
The old `` `a__b__c` `` yields emphasis inside code in asciidoc. To get a pure literal code span, use `` `+a__b__c+` ``.
2019-05-05Asciidoc writer: use proper smart quotes with asciidoctor.John MacFarlane1-8/+8
Asciidoctor has a different format for smart quotes. Closes #5487.
2019-05-05Org reader: prefer plain symbols over math symbolsAlbert Krewinkel1-3/+7
Symbols like `\alpha` are output plain and unemphasized, not as math. Fixes: #5483
2019-05-05Org reader: recognize emphasis after TODO/DONE keywordAlbert Krewinkel1-0/+7
Fixes: #5484
2019-05-04Lua: add `pandoc.system` module (#5468)Albert Krewinkel1-0/+5
The `system` Lua module provides utility functions to interact with the operating- and file system. E.g. print(pandoc.system.get_current_directory()) or pandoc.system.with_temporary_directory('tikz', function (dir) -- write and compile a TikZ file with pdflatex end)
2019-05-01Fix footnote in image caption.John MacFarlane1-0/+12
Regression! The fix for #4683 broke this case.
2019-04-30HTML: prevent gratuitious emojification on iOS.John MacFarlane3-11/+11
iOS chooses to render a number of Unicode entities, including '↩', as big colorful emoji. This can be defeated by appending Unicode VARIATION SELECTOR-15'/'VARIATION SELECTOR-16'. So we now append this character when escaping strings, for both '↩' and '↔'. If other characters prove problematic, they can simply be added to needsVariationSelector. Closes #5469.
2019-04-28Muse writer tests: compare Text without converting to [Char]Alexander Krotov1-6/+6
2019-04-15RST writer: treat Span as transparent.John MacFarlane1-0/+6
Previously an Emph inside a Span was being treated as nested markup and ignored. With this patch, the Span is just ignored. Closes #5446.
2019-04-11LaTeX template: Add pdflang to hypersetup if lang is set.John MacFarlane1-0/+1
Closes #5443.
2019-04-05Vimwiki reader: improve handling of internal links.John MacFarlane1-8/+8
1) Don't append `.html` 2) Add `wikilink` title This mirrors behavior of other wiki readers. Generally the `.html` extension is not wanted. It may be important for output to HTML in certain circumstances, but it can always be added using a filter that matches on links with title `wikilink`. Note that if you have a workflow that uses pandoc to convert vimwiki to readable HTML pages, you may need to add such a filter to reproduce current behavior. Here is a filter that does the job: ```lua function Link(el) if el.title == 'wikilink' then el.target = el.target .. ".html" end return el end ``` Save this as `fixlinks.lua` and use with `--lua-filter fixlinks.lua`. Closes #5414.
2019-04-05PowerPoint writer: expand builtin reference doc to model all layoutsJesse Rosenthal22-0/+0
The previous built-in reference doc had only title and content layouts. Add in a section-header slide and a two-content slide, so users can more easily modify it to build their own templates. Golden files needed to be regenerated. Checked on MS PowerPoint 2013.
2019-04-04PowerPoint tests: Regenerate golden filesJesse Rosenthal36-0/+0
Due to viewProps change in 61dc0f9f. Golden files checked on PowerPoint 2013 (Win 10 on virtualbox).
2019-04-02Update command test #5416 to make it windows friendlyJohn MacFarlane1-2/+4
2019-04-02LaTeX template: Ensure correct heading/table order (#5421)Andrew Dunning4-45/+5
Improve the workaround for #1658, adapting a solution by @u-fischer in <https://github.com/latex3/latex2e/issues/131> that works whether or not the `indent` variable is enabled. Remove `subparagraph` variable in LaTeX template. The default is now to use run-in style for level 4 and 5 headings (`\paragraph` and `\subparagraph`). To get the previous default behavior (where these were formatted as blocks, like `\subsubsection`), set the `block-headings` variable. An example is given in the manual of reformatting the appearance of headings more thoroughly using KOMA-Script. Closes #5365.
2019-04-02Actually run the xwiki writer tests.John MacFarlane1-1/+2
2019-04-02Add XWiki Support (#4167)Derek Chen-Becker1-0/+650
Add XWiki Support Closes #1800
2019-04-01Dokuwiki Reader fix: parse single curly brace (#5417)Mauro Bieg1-0/+11
fixes #5416
2019-03-31PowerPoint writer: add test for speaker notes after metadata.Jesse Rosenthal4-0/+9
2019-03-30Pptx writer: test for speaker notes after breaking header.Jesse Rosenthal4-0/+7
2019-03-29LaTeX writer: Avoid inadvertently creating ?` or !` ligatures.John MacFarlane1-0/+14
These are upside down ? and !, resp. Closes #5407.
2019-03-28Markdown reader: fenced div takes priority over setext header.John MacFarlane1-0/+9
For ::: {.cell} --- :::
2019-03-25LaTeX template: Add pandoc to PDF metadata (#5388)Andrew Dunning4-4/+4
Credits pandoc in content creator metadata (the default is 'LaTeX with hyperref').
2019-03-25HTML reader: read `data-foo` attribute into `foo`.John MacFarlane1-1/+1
The HTML writer adds the `data-` prefix for HTML5 for nonstandard attributes. But the attributes are represented in the AST without the `data-` prefix, so we should strip this when reading HTML. Closes #5392.
2019-03-22LaTeX template: Group graphics-related code (#5389)Andrew Dunning4-28/+12
* LaTeX template: Group graphics-related code The default figure placement was added in <https://github.com/jgm/pandoc/commit/f3ab4bc2b99e9f7f3917708a9110d6500aa051a0>; there does not appear to have been a reason for placing it at the end of the preamble. * Update tests
2019-03-22LaTeX writer: Fix footnotes in table caption and cells.John MacFarlane1-0/+44
This fixes a bug wherein footnotes appeared in the wrong order, and with duplicate numbers, when in table captions and cells. We now use regular `\footnote` commands, even in the table caption and the minipages containing cells. Apparently longtable knows how to handle this. Closes #5367.
2019-03-21Docx writer: Use w:br without attributes for line breaks.John MacFarlane2-0/+0
We previously added the attribute `type="textWrapping"`, but this causes problems on Word Online. Closes #5377.
2019-03-18Improved fix to #5340 and added test.John MacFarlane1-0/+14