aboutsummaryrefslogtreecommitdiff
path: root/test/command
AgeCommit message (Collapse)AuthorFilesLines
2018-10-14Markdown writer: ensure blank between raw block and normal content.John MacFarlane1-0/+4
Otherwise a raw block can prevent a paragraph from being recognized as such. Closes #4629.
2018-10-14Markdown reader: Fix awkward soft break movements before abbreviations.John MacFarlane1-0/+31
Closes #4635.
2018-10-11HTML reader: fix htmlTag and isInlineTag to accept processing instructions.John MacFarlane1-0/+13
Fixes regression #3123 (since 2.0). Added regression test.
2018-10-08LaTeX writer: with `--biblatex`, use `\autocite` when possible.John MacFarlane1-0/+22
`\autocites{a1}{a2}{a3}` will not collapse the entries. So, if we don't have prefixes and suffixes, we use instead `\autocite{a1;a2;a3}`. Closes #4960.
2018-10-07RST reader: don't allow single-dash separator in headerless table.John MacFarlane1-0/+10
Closes #4382.
2018-10-07LaTeX reader: fix bugs omitting raw tex.John MacFarlane4-8/+21
The default is `-raw_tex`, so no raw tex should result unless we explicitly say `+raw_tex`. Previously some raw commands did make it through. Closes #4527.
2018-10-07RST reader: pass through fields in unknown directives as div attributes.John MacFarlane1-0/+16
This commit also adds support for `class` and `name` attributes to directives in general. Closes #4715.
2018-10-05Org reader: fix behavior for successive calls of `#+EXCLUDE_TAGS`. (#4951)Brian Leung1-0/+11
Calling `#+EXCLUDE_TAGS` multiple times should preserve the status of the previously declared tags.
2018-10-05CommonMark writer: add plain text fallbacks. (#4531)quasicomputational1-0/+156
Previously, the writer would unconditionally emit HTMLish output for subscripts, superscripts, strikeouts (if the strikeout extension is disabled) and small caps, even with raw_html disabled. Now there are plain-text (and, where possible, fancy Unicode) fallbacks for all of these corresponding (mostly) to the Markdown fallbacks, and the HTMLish output is only used when raw_html is enabled. This commit adds exported functions `toSuperscript` and `toSubscript` to `Text.Pandoc.Writers.Shared`. [API change] Closes #4528.
2018-10-05Org reader: Add partial support for `#+EXCLUDE_TAGS` option. (#4950)Brian Leung1-0/+29
Closes #4284. Headers with the corresponding tags should not appear in the output. If one or more of the specified tags contains a non-tag character like `+`, Org-mode will not treat that as a valid tag, but will nonetheless continue scanning for valid tags. That behavior is not replicated in this patch; entering `cat+dog` as one of the entries in `#+EXCLUDE_TAGS` and running the file through Pandoc will cause the parser to fail and result in the only excluded tag being the default, `noexport`.
2018-09-30Implement `--ascii` (`writerPreferAscii`) in writers, not App.John MacFarlane1-0/+45
Now the `write*` functions for Docbook, HTML, ICML, JATS, Man, Ms, OPML are sensitive to `writerPreferAscii`. Previously the to-ascii translation was done in Text.Pandoc.App, and thus not available to those using the writer functions directly. In addition, the LaTeX writer is now sensitive to `writerPreferAscii` and to `--ascii`. 100% ASCII output can't be guaranteed, but the writer will use commands like `\"{a}` and `\l` whenever possible, to avoid emiting a non-ASCII character. A new unexported module, Text.Pandoc.Groff, has been added to store functions used in the different groff-based writers.
2018-09-29LaTeX reader: allow verbatim blocks ending with blank lines.John MacFarlane1-0/+30
Closes #4624.
2018-09-26Force inline code blocks to honor export options.leungbk1-0/+8
`exportsCode` is moved from `Blocks.hs` to `Shared.hs` and exported accordingly.
2018-09-25Add support for multiprenote and multipostnote arguments in LaTeX. (#4930)Brian Leung1-0/+48
* Add support for multiprenote and multipostnote arguments. The multiprenotes occur before the first prefix of a multicite, and the multipostnotes follow the last suffix. * Add test for multiprenote and multipostnote.
2018-09-20RST reader: fix bug with internal link targets.John MacFarlane1-0/+14
They were gobbling up indented content underneath. Closes #4919.
2018-09-19Markdown reader: distinguish autolinks in the AST.John MacFarlane2-1/+35
With this change, autolinks are parsed as Links with the `uri` class. (The same is true for bare links, if the `autolink_bare_uris` extension is enabled.) Email autolinks are parsed as Links with the `email` class. This allows the distinction to be represented in the URI. Formerly the `uri` class was added to autolinks by the HTML writer, but it had to guess what was an autolink and could not distinguish `[http://example.com](http://example.com)` from `<http://example.com>`. It also incorrectly recognized `[pandoc](pandoc)` as an autolink. Now the HTML writer simply passes through the `uri` attribute if it is present, but does not add anything. The Textile writer has been modified so that the `uri` class is not explicitly added for autolinks, even if it is present. Closes #4913.
2018-09-16Markdown reader: example_lists should work without startnum.John MacFarlane1-0/+16
Closes #4908.
2018-09-15add test for --metadata-filemb212-0/+19
2018-09-15add test yaml-metadata-blocks.mdmb211-0/+48
2018-09-09LaTeX reader: resolve `\ref` for figure numbers.John MacFarlane1-1/+44
2018-09-07HTML reader: parse `<script type="math/tex` tags as math.John MacFarlane1-0/+13
These are used by MathJax. Closes #4877.
2018-08-29RSTR reader: don't skip link definitions after comments.John MacFarlane1-0/+9
Closes #4860.
2018-08-24HTML reader: allow enabling `raw_tex` extension.John MacFarlane1-0/+29
This now allows raw LaTeX environments, `\ref`, and `\eqref` to be parsed (which is helpful for translation HTML documents using MathJaX). Closes #1126.
2018-08-22HTML reader: extract spaces inside links instead of trimming themAlexander Krotov1-0/+6
Fixes #4845
2018-08-21LaTeX reader: support blockcquote, foreignblockquote from csquotes.John MacFarlane1-3/+4
Also foreigncblockquote, hyphenblockquote, hyphencblockquote. Closes #4848. But note: currently foreignquote will be parsed as a regular Quoted inline (not using the quotes appropriate to the foreign language).
2018-08-21LaTeX reader: support enquote*, foreignquote, hypphenquote...John MacFarlane1-0/+58
from csquotes. See #4848. Still TBD: blockquote, blockcquote, foreignblockquote.
2018-08-17LaTeX reader: Support more text-mode accents.John MacFarlane1-4/+4
Add support for `\|`, `\b`, `\G`, `\h`, `\d`, `\f`, `\r`, `\t`, `\U`, `\i`, `\j`, `\newtie`, `\textcircled`. Also fall back to combining characters when composed characters are not available. Closes #4652.
2018-08-17Add support for latex mintinline (#4365)Marc Schreiber1-0/+22
2018-08-17LaTeX reader: fix siunitx unit commands...John MacFarlane1-0/+6
...they should only be recognized in siunitx contexts. For example, `\l` outside of an siunitx context should be l-slash, not l (for liter)! Closes #4842.
2018-08-15Markdown reader: Use "tex" instead of "latex" for raw tex-ish content.John MacFarlane9-13/+13
We can't always tell if it's LaTeX, ConTeXt, or plain TeX. Better just to use "tex" always. Also changed: ConTeXt writer: now outputs raw "tex" blocks as well as "context". (Closes #969). RST writer: uses ".. raw:: latex" for "tex" content. (RST doesn't support raw context anyway.) Note that if "context" or "latex" specifically is desired, you can still force that in a markdown document by using the raw attribute (see MANUAL.txt): ```{=latex} \foo ``` Note that this change may affect some filters, if they assume that raw tex parsed by the Markdown reader will be RawBlock (Format "latex"). In most cases it should be trivial to modify the filters to accept "tex" as well.
2018-08-14LaTeX reader: handle parameter patterns for `\def`.John MacFarlane1-0/+7
For example: `\def\foo#1[#2]{#1 and #2}`. Closes #4768. Also fixes #4771. API change: in Text.Pandoc.Readers.LaTeX.Types, new type ArgSpec added. Second parameter of Macro constructor is now `[ArgSpec]` instead of `Int`.
2018-08-13RST writer: render Divs with admonition classes as admonitions.John MacFarlane1-0/+20
Also omit Div with class "admonition-title". These are generated by the RST reader and should be omitted on round-trip. Closes #4833.
2018-08-12LaTeX reader: Allow `%` characters in URLs.John MacFarlane1-0/+21
This affects `\href` and `\url`. Closes #4832.
2018-08-07Markdown reader: Properly handle boolean values in YAML metadata.John MacFarlane1-0/+50
This fixes a regression in 2.2.3, which cause boolean values to be parsed as MetaInlines instead of MetaBool. Note also an undocumented (but desirable) change in 2.2.3: numbers are now parsed as MetaInlines rather than MetaString. Closes #4819.
2018-08-06Fix parsing of embedded mappings in YAML metadata.John MacFarlane1-0/+10
This fixes a regression in 2.2.3 which caused embedded mappings (e.g. mappings in sequences) not to work in YAML metadata. Closes #4817.
2018-08-05RST reader: improve parsing of inline interpreted text roles.John MacFarlane2-2/+50
* Use a Span with class "title-reference" for the default title-reference role. * Use B.text to split up contents into Spaces, SoftBreaks, and Strs for title-reference. * Use Code with class "interpreted-text" instead of Span and Str for unknown roles. (The RST writer has also been modified to round-trip this properly.) * Disallow blank lines in interpreted text. * Backslash-escape now works in interpreted text. * Backticks followed by alphanumerics no longer end interpreted text. Closes #4811.
2018-08-05Added test case for #4669 to repository.John MacFarlane1-0/+29
2018-07-24RST reader: remove support for nested inlines.danse1-6/+0
RST does not allow nested emphasis, links, or other inline constructs. Closes #4581, double parsing of links with URLs as link text. This supersedes the earlier fix for #4581 in 6419819b46c0d69c7024ba8aa4a6381cb311341c. Fixes #4561, a bug parsing with URLs inside emphasis. Closes #4792.
2018-07-24MediaWiki writer: Avoid extra blank line in tables with empty cells.John MacFarlane1-0/+18
Note that the old output is semantically identical, but the new output looks better. Closes #4794.
2018-07-21RST reader: fix double-link bug.John MacFarlane1-0/+6
Link labels containing raw URLs were parsed as autolinks, but links within links are not allowed. Closes #4581.
2018-07-19Fix for bug in parsing `\include` in markdown.John MacFarlane1-0/+22
Starting in 2.2.2, everything after an `\input` (or `\include`) in a markdown file would be parsed as raw LaTeX. This commit fixes the issue and adds a regression test. Closes #4781.
2018-07-15Make markdown and github writers respect the `emoji` extension.John MacFarlane1-0/+27
2018-07-15Wrap emojis in span nodes (#4759)Anders Waldenborg2-1/+26
Text.Pandoc.Emoji now exports `emojiToInline`, which returns a Span inline containing the emoji character and some attributes with metadata (class `emoji`, attribute `data-emoji` with emoji name). Previously, emojis (as supported in Markdown and CommonMark readers, e.g ":smile:") were simply translated into the corresponding unicode code point. By wrapping them in Span nodes, we make it possible to do special handling such as giving them a special font in HTML output. We also open up the possibility of treating them differently when the `--ascii` option is selected (though that is not part of this commit). Closes #4743.
2018-07-12AsciiDoc Writer: escape square brackets at start of line (#4708)Mauro Bieg1-0/+20
closes #4545
2018-07-02More spellcheckAlexander Krotov1-1/+1
2018-06-30RST writer: don't treat 'example' as a syntax name.John MacFarlane1-0/+16
This fixes conversions from org with example blocks. Closes #4748.
2018-06-29CommonMark reader: Handle ascii_identifiers extension (#4733)Anders Waldenborg1-0/+25
Non-ascii characters were not stripped from identifiers even if the `ascii_identifiers` extension was enabled (which is is by default for gfm). Closes #4742
2018-06-28TikiWiki reader: improve list parsing (#4723)Mauro Bieg1-0/+34
- remove trailing Space from list items - parse lists that have no space after marker (fixes #4722)
2018-06-13Markdown reader: allow empty code spans.John MacFarlane1-0/+6
E.g. `` ` ` ``.
2018-06-13LaTeX Reader: parse figure label into Image id (#4704)Mauro Bieg2-2/+2
closes #4700