aboutsummaryrefslogtreecommitdiff
path: root/test/command
AgeCommit message (Collapse)AuthorFilesLines
2019-02-23JATS reader: fix parsing of figures.John MacFarlane1-0/+24
This ensures that a figure containing a single image is parsed as a pandoc "implicit figure" (i.e., a Para with a single Image whose title attribute begins with `fig:`). More complex figures will still be parsed as divs. Closes #5321.
2019-02-15Markdown reader: fix bug parsing fenced code blocks.John MacFarlane1-0/+24
Previously parsing would break if the code block contained a string of backticks of sufficient length followed by something other than end of line. Closes #5304.
2019-02-08Improve tight/loose list handling.John MacFarlane1-0/+15
Closes #5285. Previously the algorithm allowed list items with a mix of Para and Plain, which is never wanted. compactify in T.P.Shared has been modified so that, if a list's items contain (at the top level) Para elements (aside from perhaps at the very end), ALL Plains are converted to Paras.
2019-02-04Markdown reader: add newline when parsing blocks in YAML.John MacFarlane1-0/+12
Otherwise last block gets parsed as a Plain rather than a Para. This is a regression in pandoc 2.x. This patch restores pandoc 1.19 behavior. Closes #5271.
2019-02-02Update test for last commit.John MacFarlane1-3/+3
2019-02-01LaTeX writer: avoid `{}` after control sequences when escaping.John MacFarlane2-4/+3
`\ldots{}.` doesn't behave as well as `\ldots.` with the latex ellipsis package. This patch causes pandoc to avoid emitting the `{}` when it is not necessary. Now `\ldots` and other control sequences used in escaping will be followed by either a `{}`, a space, or nothing, depending on context. Thanks to Elliott Slaughter for the suggestion.
2019-01-31LaTeX reader: don't let `\egroup` match `{`.John MacFarlane1-0/+12
`braced` now actually requires nested braces. Otherwise some legitimate command and environment definitions can break (see test/command/tex-group.md).
2019-01-22LaTeX reader: support `\endinput`. Closes #5233.John MacFarlane1-0/+9
2019-01-21HTML and markdown: treat textarea as a verbatim environment.John MacFarlane1-0/+12
We don't want to parse its contents as Markdown or HTML. Closes #5241.
2019-01-09RST reader: change treatment of `number-lines` directives. (#5207)Brian Leung2-0/+11
Directives of this type without numeric inputs should not have a `startFrom` attribute; with a blank value, the writers can produce extra whitespace.
2019-01-08Removed superfluous sourceCode class on code blocks.John MacFarlane1-1/+1
* These were added by the RST reader and, for literate Haskell, by the Markdown and LaTeX readers. There is no point to this class, and it is not applied consistently by all readers. See #5047. * Reverse order of `literate` and `haskell` classes on code blocks when parsing literate Haskell. Better if `haskell` comes first.
2019-01-02Implement task lists (#5139)Mauro Bieg2-0/+142
Closes #3051
2019-01-02Commonmark writer: fix handling of SoftBreak with `hard_line_breaks`.John MacFarlane1-0/+7
This should be rendered as a space. Closes #5195.
2018-12-31Simplify/fix reading of `--metadata` values on command line.John MacFarlane1-0/+12
Previously we used HsYAML's decodeStrict to recognize boolean values (treating everything else as a string). This caused problems relating to hvr/HsYAML#7. We now just check for the recognized boolean values `true|True|TRUE|false|False|FALSE`, and avoid using HsYAML. Closes #5177.
2018-12-28Org writer: preserve line-numbering for example and code blocks.leungbk1-0/+41
2018-12-05RST writer: don't wrap simple table header lines.John MacFarlane1-0/+18
Closes #5128.
2018-12-04Strip out illegal XML characters in escapeXMLString.John MacFarlane1-0/+9
Closes #5119.
2018-12-03Markdown writer: include needed whitespace after HTML figure.John MacFarlane1-0/+13
We use HTML for a figure in markdown dialects that can't represent it natively. Closes #5121.
2018-11-25Added test for #5053.John MacFarlane1-0/+14
Note that the fix for #5099 also fixes #5053, a pandoc 2.4 regression in parsing underscore emphasis after symbols.
2018-11-25Fix parsing of citations and quotes after parentheses.John MacFarlane3-13/+15
Starting with pandoc 2.4, citations and quoted inlines were no longer recognized after parentheses. This is because of commit 9b0bd4ec6f5c9125efb3e36232e6d1f6ac08a728, which is reverted here. The point of that commit was to allow relocation of soft line breaks to before an abbreviation, so that a nonbreaking space could be added after the abbreviation. Now we simply leave the soft line break in place, even though this means that we won't get a nonbreaking space after "Mr." at the end of a line (and in LaTeX this may result in a longer intersentential space). Those who care about this issue should take care not to end lines with an abbreviation, or to insert nonbreaking spaces manually. Closes #5099.
2018-11-16HTML reader: allow tfoot before body rows.John MacFarlane1-0/+16
Closes #5079.
2018-11-15HTML reader: parse `<small>` as a Span with class "small".John MacFarlane1-0/+7
Closes #5080.
2018-11-15Asciidoc writer: Render Spans using `[#id .class]#contents#`.John MacFarlane1-0/+6
See #5080.
2018-11-13Fix test case for #5014.John MacFarlane1-1/+3
2018-11-13HTML reader: allow thead containing a row with td rather than th.John MacFarlane1-0/+17
See #5014. Note that this doesn't address the original issue in #5014, only an unrelated side-issue.
2018-11-12LaTeX writer: don't emit `[<+->]` unless beamer output,John MacFarlane1-0/+14
even if `writerIncremental` is True. See #5072.
2018-11-11Exactly match GitHub's identifier generating algorithm.John MacFarlane1-0/+4
See #5057.
2018-11-11Text.Pandoc.Shared: add parameter to uniqueIdent, inlineListToIdentifier.John MacFarlane1-4/+4
The parameter is Extensions. This allows these functions to be sensitive to the settings of `Ext_gfm_auto_identifiers` and `Ext_ascii_identifiers`. This allows us to use `uniqueIdent` in the CommonMark reader, replacing some custom code. It also means that `gfm_auto_identifiers` can now be used in all formats. Semantically, `gfm_auto_identifiers` is now a modifier of `auto_identifiers`; for identifiers to be set, `auto_identifiers` must be turned on, and then the type of identifier produced depends on `gfm_auto_identifiers` and `ascii_identifiers` are set. Closes #5057.
2018-11-06Add command test for #5050.John MacFarlane1-0/+7
2018-11-05CommonMark writer: respect --ascii (#5043)quasicomputational1-0/+36
2018-11-04XML: toHtml5Entities: prefer shorter entities...John MacFarlane1-2/+2
when there are several choices for a particular character.
2018-11-02Roff reader: Improved handling of custom strings as arguments.John MacFarlane1-0/+27
Added test.
2018-11-01Implement --ascii for Markdown writer.John MacFarlane1-0/+8
2018-11-01HTML writer: use character entities references when possible for HTML5.John MacFarlane1-1/+1
2018-10-31LaTeX writer: add newline if math ends in a comment.John MacFarlane1-0/+7
This prevents the closing delimiter from being swalled up in the comment. Closes #4880.
2018-10-29LaTeX reader: allow space at end of math after `\`.John MacFarlane1-0/+21
Closes #5010. Expose trimMath from T.P.Shared.
2018-10-25Lua: allow access to pandoc state (#5015)Albert Krewinkel2-0/+25
* Lua: allow access to pandoc state Lua filters and custom writers now have read-only access to most fields of pandoc's internal state via the global variable `PANDOC_STATE`. * Lua: allow iterating through fields of PANDOC_STATE * Lua filters doc: describe CommonState * Lua filters doc: mention global variable PANDOC_STATE * Lua: add access to logs Log messages can currently only be printed, but not decomposed.
2018-10-23Groff writer character escaping changes.John MacFarlane1-1/+1
T.P.GroffChar: replaced `essentialEscapes` with `manEscapes`, which includes all the escapes mentioned in the groff_man manual. T.P.Writers.Groff: removed escapeCode; changed parameter on escapeString from Bool to new type `EscapeMode`. Rewrote `escapeString`.
2018-10-22LaTeX reader: add support for `nolinkurl` command. (#4992)Brian Leung1-0/+10
2018-10-18Groff escaping changes.John MacFarlane2-3/+3
- `--ascii` is now turned on automatically for man output, for portability. All man output will be escaped to ASCII. - In T.P.Writers.Groff, `escapeChar`, `escapeString`, and `escapeCode` now take a boolean parameter that selects ascii-only output. This is used by the Ms writer for `--ascii`, instead of doing an extra pass after writing the document. - In ms output without `--ascii`, unicode is used whenever possible (e.g. for double quotes). - A few escapes are changed: e.g. `\[rs]` instead of `\\` for backslash, and `\ga]` instead of `` \` `` for backtick.
2018-10-17Move common groff functions to Text.Pandoc.Writers.GroffJohn MacFarlane2-2/+2
(unexported module). These are used in both the man and ms writers. Moved groffEscape out of Text.Pandoc.Writers.Shared [cancels earlier API change from adding it, which was after last release]. This fixes strong/code combination on man (should be `\f[CB]` not `\f[BC]`), mentioned in #4973. Updated tests. Closes #4975.
2018-10-17Man writer: use \f[R] instead of \f[] to reset fontAlexander Krotov1-3/+4
Fixes #4973
2018-10-15LaTeX reader: make macroDef polymorphic and allow in inline context.John MacFarlane1-2/+1
Otherwise we can't parse something like ``` \lowercase{\def\x{Foo}} ``` I have actually seen tex like this in the wild.
2018-10-15Added failing test case for macros.John MacFarlane1-0/+18
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.