aboutsummaryrefslogtreecommitdiff
path: root/test
AgeCommit message (Collapse)Author
2019-11-11Merge branch 'text' of https://github.com/despresc/pandoc into despresc-textJohn MacFarlane
2019-11-11Markdown reader: fix small super/subscript issue.John MacFarlane
Superscripts and subscripts cannot contain spaces, but newlines were previously allowed (unintentionally). This led to bad interactions in some cases with footnotes. E.g. ``` foo^[note] bar^[note] ``` With this change newlines are also not allowed inside super/subscripts. Closes #5878.
2019-11-11Change the implementation of `htmlSpanLikeElements` and implement `<dfn>` ↵Florian Beeres
(#5882) * Add HTML Reader support for `<dfn>`, parsing this as a Span with class `dfn`. * Change `htmlSpanLikeElements` implementation to retain classes, attributes and inline content.
2019-11-09Switch the remaining tests to Textdespresc
2019-11-09Switch Tests.Helpers and Tests.Writers.* to Textdespresc
2019-11-09Switch App to Text, remove usage of Legacy in srcdespresc
2019-11-08Switch XML to Text, add Legacydespresc
2019-11-08Switch Class to Text, add Legacydespresc
2019-11-08Switch Options to Text, add Legacy, remove redundant imports elsewheredespresc
2019-11-08Start switch of Shared, add Legacy.Shared moduledespresc
2019-11-08Use the text branch of pandoc-types and texmath, switch to Legacy.*despresc
As part of the switch to Text, imports of Pandoc.Builder and Pandoc.Definition were changed to their Legacy counterparts. Compatibility functions were added to modules using texmath. These will all be removed as refactoring progresses. The stack.yaml extra-deps for pandoc-types and texmath now use the latest commit in the text branch of those packages.
2019-11-07DocBook reader: Fix bug with entities in mathphrase element.John MacFarlane
Closes #5885.
2019-11-07Change merge behavior for metadata.John MacFarlane
Previously, if a document contained two YAML metadata blocks that set the same field, the conflict would be resolved in favor of the first. Now it is resolved in favor of the second (due to a change in pandoc-types). This makes the behavior more uniform with other things in pandoc (such as reference links and `--metadata-file`).
2019-11-04HTML Reader/Writer - Add support for <var> and <samp> (#5861)Amogh Rathore
Closes #5799
2019-11-03Docx reader: fix list number resumption for sublists. Closes #4324.John MacFarlane
The first list item of a sublist should not resume numbering from the number of the last sublist item of the same level, if that sublist was a sublist of a different list item. That is, we should not get: ``` 1. one 1. sub one 2. sub two 2. two 3. sub one ```
2019-11-03Place caption before table in OpenDocument format. (#5869)Dmitry Pogodin
Closes #5681.
2019-11-02LaTeX reader: Fixed dollar-math parsing...John MacFarlane
...to ensure that space is left between a control seq and a following word that would otherwise change its meaning. Closes #5836.
2019-11-02Add test for #5836.John MacFarlane
2019-11-02Test for macro definitions in LaTeX preamble.John MacFarlane
2019-11-02Add test case for #5845.John MacFarlane
2019-10-31Jira writer: remove extraneous newline after single-line block quotesAlbert Krewinkel
See #5858
2019-10-30Use latest doclayout.John MacFarlane
Closes #5863.
2019-10-30docbook reader: fix nesting of chapters and sections (#5864)Florian Klink
* Set dbBook to true when traversing a chapter too. Currently, a `<title/>` in a chapter and in a `<section/>` below that chapter have the same level if they're not inside a `<book/>`. This can happen in a multi-file book project. Also see the example at https://tdg.docbook.org/tdg/4.5/chapter.html Co-authored-by: Félix Baylac-Jacqué <[email protected]> * Add docbook-chapter test This tests nested `<section/>` and makes sure `<title/>` in the first `<section/>` below `<chapter/>` is one level deeper than the `<chapter/>`'s `<title/>`, also when not inside a `<book/>`. Co-authored-by: Félix Baylac-Jacqué <[email protected]>
2019-10-29T.P.W.Shared: Changed gridTables so it does better at...John MacFarlane
...keeping the widths of columns. See #4320. Adjust test case for #4320.
2019-10-29Changes to build with new doctemplates/doclayout.John MacFarlane
The new version of doctemplates adds many features to pandoc's templating system, while remaining backwards-compatible. New features include partials and filters. Using template filters, one can lay out data in enumerated lists and tables. Templates are now layout-sensitive: so, for example, if a text with soft line breaks is interpolated near the end of a line, the text will break and wrap naturally. This makes the templating system much more suitable for programatically generating markdown or other plain-text files from metadata.
2019-10-29Remove include of grffile from default latex template.John MacFarlane
This package is needed for proper handling of image filenames containing periods (in addition to the period before the extension). Unfortunately, grffile breaks in the latest texlive update. Until a fix is released (see ho-tex/oberdiek#73) it seems best to remove this from the default template. This may cause problems if you have filenames with periods. The workaround is to put `\usepackage{grffile}` in header-includes, and be sure you're using an older version of texlive packages. See #5848. We will leave that issue open to remind us to check upstream, and restore grffile when it's possible to do so.
2019-10-29Shared.makeSections: better behavior in some corner cases.John MacFarlane
When a div surrounds multiple sections at the same level, or a section of highre level followed by one of lower level, then we just leave it as a div and create a new div for the section. Closes #5846, closes #5761.
2019-10-28Shared: improve isTight.John MacFarlane
If a list has an empty item, this should not count against its being a tight list. Closes #5857.
2019-10-27Org reader: fix parsing of empty comment linesAlbert Krewinkel
Comment lines in Org-mode can be completely empty; both of these line should produce no output: # a comment # The reader used to produce a wrong result for the latter, but ignores that line as well now. Fixes: #5856
2019-10-24HTML reader/writer: Better handling of <q> with cite attribute (#5837)Ole Martin Ruud
* HTML reader: Handle cite attribute for quotes. If a `<q>` tag has a `cite` attribute, we interpret it as a Quoted element with an inner Span. Closes #5798 * Refactor url canonicalization into a helper function * Modify HTML writer to handle quote with cite. [0]: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/q
2019-10-23Add Reader support for HTML <samp> element (#5843)Amogh Rathore
The `<samp>` element is parsed as a Span with class `sample`. Closes #5792.
2019-10-16Add support for reading & writing <mark> elementsFlorian B
Parse <mark> elements from HTML as HTML span like elements, with a single class matching the tag name `mark`. Mark elements are rendered to HTML using the native <mark> element. Fixes https://github.com/jgm/pandoc/issues/5797.
2019-10-15Add support for reading and writing <kbd> elementsDaniele D'Orazio
* Text.Pandoc.Shared: export `htmlSpanLikeElements` [API change] This commit also introduces a mapping of HTML span like elements that are internally represented as a Span with a single class, but that are converted back to the original element by the html writer. As of now, only the kbd element is handled this way. Ideally these elements should be handled as plain AST values, but since that would be a breaking change with a large impact, we revert to this stop-gap solution. Fixes https://github.com/jgm/pandoc/issues/5796.
2019-10-15Muse reader: do not allow closing asterisks to be followed by "*"Alexander Krotov
2019-10-14Minor template & test changes for latest dev doctemplates.John MacFarlane
2019-10-15Muse reader: do not split series of asterisks into symbols and emphasisAlexander Krotov
Fixes #5821
2019-10-15Muse reader: do not terminate emphasis on "*" not followed by spaceAlexander Krotov
2019-10-12LaTeX writer: fix horizontal rule.John MacFarlane
We change to use 0.5pt rather than `\linethickness`, which apparently only ever worked "by accident" and no longer works with recent updates to texlive. Closes #5801.
2019-10-11Fix `gfm_auto_identifiers` behavior with emojis.John MacFarlane
Closes #5813. Note that we also now use emoji names for emojis when `ascii_identifiers` is enabled.
2019-10-11Markdown writer: prefer pipe_tables to raw html...John MacFarlane
...even when we must lose width information. All in all this seems to be people's preferred behavior, even though it is slightly lossier. Closes #2608. Closes #4497.
2019-10-10`--metadata-file`: when multiple files specified, second takes precedence...John MacFarlane
on conflicting fields. This changes earlier behavior (but not in a release), where first took precedence. Note that this may seem inconsistent with the behavior of multiple YAML blocks within a document, where the first takes precedence. Still, it is convenient to be able to override defaults with options later on the command line.
2019-10-10Make some writers sensitive to 'unlisted' class on headings.John MacFarlane
If this is present on a heading with the 'unnumbered' class, the heading won't appear in the TOC. This class has no effect if 'unnumbered' is not also specified. This affects HTML-based writers (including slide shows and epub), LateX (including beamer), RTF, and PowerPoint. Other writers do not yet support `unlisted`. Closes #1762.
2019-10-09RST writer: proper handling of :align: on figures, images.John MacFarlane
When the image has the `align-right` (etc.) class, we now use an `:align:` attribute. Closes #4420.
2019-10-09Update s5 test for mathjax 3 change.John MacFarlane
2019-10-09Options.WriterOptions: Change type of writerVariables to Context Text.John MacFarlane
This will allow structured values. [API change]
2019-10-04hlint Muse reader testsAlexander Krotov
2019-10-03Minor ghc 8.8 fixups.John MacFarlane
2019-09-24odt: Add external option for native numberingNils Carlson
This adds an external options +native_numbering to the ODT writer enabling enumeration of figures and tables in ODT output.
2019-09-23Man writer: suppress non-absolute link URLs.John MacFarlane
Motivation: in a man page there's not much use for relative URLs, which you can't follow. Absolute URLs are still useful. We previously suppressed relative URLs starting with '#' (purely internal links), but it makes sense to go a bit farther. Closes #5770.
2019-09-23ConTeXt unit tests - tweak code property.John MacFarlane
Inline code will never have two consecutive newlines. We get a counterexample in this case https://pipelines.actions.githubusercontent.com/bMXCpShstkkHbFPgw9hBRMWw2w9plyzdVM8r7CRPFBHFvidaAG/5cf52d2d-3804-412d-ae65-4f8c059b0fb7/_apis/pipelines/1/runs/116/signedlogcontent/39?urlExpires=2019-09-23T17%3A38%3A05.8358735Z&urlSigningMethod=HMACV1&urlSignature=Qtd6vnzqgSwXpAkIyp9DJY4Kn7GJzYMR8UDkLR%2FsMQY%3D so for simplicity we just weed out code with newlines.