aboutsummaryrefslogtreecommitdiff
path: root/test/command
AgeCommit message (Collapse)AuthorFilesLines
2017-08-11Added simple test for translations.John MacFarlane1-0/+13
2017-08-10RST reader: implement csv-table directive.John MacFarlane2-0/+59
Most attributes are supported, including `:file:` and `:url:`. A (probably insufficient) test case has been added. Closes #3533.
2017-08-09LaTeX reader: Use `label` instead of `data-label` for label in caption.John MacFarlane1-1/+1
See d441e656db576f266c4866e65ff9e4705d376381, #3639.
2017-08-08CommonMark writer: avoid excess blank lines at end of output.John MacFarlane1-8/+0
2017-08-08Thread options through CommonMark reader.John MacFarlane1-0/+8
This is more efficient than doing AST traversals for emojis and hard breaks. Also make behavior sensitive to `raw_html` extension.
2017-08-08CommonMark writer: support `hard_line_breaks`, `smart`.John MacFarlane1-0/+103
Add tests.
2017-08-07Markdown reader: fixed spurious parsing as citation as reference def.John MacFarlane1-0/+15
We now disallow reference keys starting with `@` if the `citations` extension is enabled. Closes #3840.
2017-08-07LaTeX reader: Support simple `\def` macros.John MacFarlane1-0/+28
Note that we still don't support macros with fancy parameter delimiters, like \def\foo#1..#2{...}
2017-08-07LaTeX reader: Support `\let`.John MacFarlane1-0/+23
Also, fix regular macros so they're expanded at the point of use, and NOT also the point of definition. `\let` macros, by contrast, are expanded at the point of definition. Added an `ExpansionPoint` field to `Macro` to track this difference.
2017-08-02DokuWiki reader: better handling for code block in list item.John MacFarlane1-0/+14
Closes #3824.
2017-07-26Small tweak in test (add --wrap=preserve).John MacFarlane1-4/+7
2017-07-26HTML writer: render raw inline environments when --mathjax used.John MacFarlane1-0/+29
We previously did this only with raw blocks, on the assumption that math environments would always be raw blocks. This has changed since we now parse them as inline environments. Closes #3816.
2017-07-25HTML writer: insert data- in front of unsupported attributes.John MacFarlane1-0/+16
Thus, a span with attribute 'foo' gets written to HTML5 with 'data-foo', so it is valid HTML5. HTML4 is not affected. This will allow us to use custom attributes in pandoc without producing invalid HTML.
2017-07-25Merge branch 'textcolor-support' of https://github.com/schrieveslaach/pandoc ↵John MacFarlane1-0/+127
into schrieveslaach-textcolor-support
2017-07-24LaTeX reader: support etoolbox's ifstrequal.John MacFarlane1-0/+10
2017-07-24Added a test case with `markdown-latex_macros`.John MacFarlane1-1/+10
2017-07-24LaTeX reader: some improvements in macro parsing.John MacFarlane1-0/+8
Fixed applyMacros so that it operates on the whole string, not just the first token! Don't remove macro definitions from the output, even if Ext_latex_macros is set, so that macros will be applied. Since they're only applied to math in Markdown, removing the macros can have bad effects. Even for math macros, keeping them should be harmless.
2017-07-22HTML Reader: parse figure and figcaption (#3813)Mauro Bieg1-0/+45
2017-07-21LaTeX reader: handle optional args in raw `\titleformat`.John MacFarlane1-0/+6
Closes #3804.
2017-07-19LaTeX reader: fixed regression with starred environment names.John MacFarlane1-0/+10
Closes #3803.
2017-07-13Add LaTeX xspace support (#3797)schrieveslaach1-0/+27
2017-07-13Merge branch 'master' of https://github.com/jgm/pandoc into textcolor-supportMarc Schreiber17-4/+241
2017-07-12Make sure \write18 is parsed as raw LaTeX.John MacFarlane3-1/+18
The change is in the LaTeX reader's treatment of raw commands, but it also affects the Markdown reader.
2017-07-11HTML reader: Ensure that paragraphs are closed properly...John MacFarlane1-0/+7
when the parent block element closes, even without `</p>`. Closes #3794.
2017-07-07Rewrote LaTeX reader with proper tokenization.John MacFarlane8-3/+98
This rewrite is primarily motivated by the need to get macros working properly. A side benefit is that the reader is significantly faster (27s -> 19s in one benchmark, and there is a lot of room for further optimization). We now tokenize the input text, then parse the token stream. Macros modify the token stream, so they should now be effective in any context, including math. Thus, we no longer need the clunky macro processing capacities of texmath. A custom state LaTeXState is used instead of ParserState. This, plus the tokenization, will require some rewriting of the exported functions rawLaTeXInline, inlineCommand, rawLaTeXBlock. * Added Text.Pandoc.Readers.LaTeX.Types (new exported module). Exports Macro, Tok, TokType, Line, Column. [API change] * Text.Pandoc.Parsing: adjusted type of `insertIncludedFile` so it can be used with token parser. * Removed old texmath macro stuff from Parsing. Use Macro from Text.Pandoc.Readers.LaTeX.Types instead. * Removed texmath macro material from Markdown reader. * Changed types for Text.Pandoc.Readers.LaTeX's rawLaTeXInline and rawLaTeXBlock. (Both now return a String, and they are polymorphic in state.) * Added orgMacros field to OrgState. [API change] * Removed readerApplyMacros from ReaderOptions. Now we just check the `latex_macros` reader extension. * Allow `\newcommand\foo{blah}` without braces. Fixes #1390. Fixes #2118. Fixes #3236. Fixes #3779. Fixes #934. Fixes #982.
2017-06-30Markdown writer: Ensure that `+` and `-` are escaped properly...John MacFarlane1-0/+14
so they don't cause spurious lists. Previously they were only if succeeded by a space, not if they were at end of line. Closes #3773.
2017-06-27RST reader: support anchors.John MacFarlane1-0/+17
E.g. `hello` .. _hello: paragraph This is supported by putting "paragraph" in a Div with id `hello`. Closes #262.
2017-06-27RST reader: Handle chained link definitions.John MacFarlane1-0/+9
For example, .. _hello: .. _goodbye: example.com Here both `hello` and `goodbye` should link to `example.com`. Fixes the first part of #262.
2017-06-23Markdown reader: interpret YAML metadata as Inlines when possible.John MacFarlane1-0/+23
If the metadata field is all on one line, we try to interpret it as Inlines, and only try parsing as Blocks if that fails. If it extends over one line (including possibly the `|` or `>` character signaling an indented block), then we parse as Blocks. This was motivated by some German users finding that date: '22. Juin 2017' got parsed as an ordered list. Closes #3755.
2017-06-23Text.Pandoc.Extensions: Added `Ext_raw_attribute`.John MacFarlane1-0/+28
Documented in MANUAL.txt. This is enabled by default in pandoc markdown and multimarkdown.
2017-06-20Fixed footnotes in table captions.John MacFarlane1-0/+27
Note that if the table has a first page header and a continuation page header, the notes will appear only on the first occurrence of the header. Closes #2378.
2017-06-12Merge branch 'master' into textcolor-supportschrieveslaach40-4/+1261
2017-06-12Markdown writer: don't allow soft break in header.John MacFarlane1-0/+25
Closes #3736.
2017-06-11Don't allow backslash + newline to affect block structure.John MacFarlane1-0/+21
Note that as a result of this change, the following, which formerly produced a header with two lines separated by a line break, will now produce a header followed by a paragraph: # Hi\ there This may affect some existing documents that relied on this undocumented and unintended behavior. This change makes pandoc more consistent with other Markdown implementations, and with itself (since the two-space version of a line break doesn't work inside ATX headers, and neither version works inside Setext headers). Closes #3730.
2017-06-11Support for \faCheck and \faClose (#3727)schrieveslaach1-0/+13
2017-06-01HTML writer: Avoid two class attributes when adding 'uri' class.John MacFarlane1-0/+6
Closes #3716.
2017-06-01Markdown writer: Avoid inline surround-marking with empty content.John MacFarlane1-0/+15
E.g. we don't want `<strong></strong>` to become `****`. Similarly for emphasis, super/subscript, strikeout. Closes #3715.
2017-06-01LaTeX reader: handle some width specifiers on table columns.John MacFarlane1-2/+2
Currently we only handle the form `0.9\linewidth`. Anything else would have to be converted to a percentage, using some kind arbitrary assumptions about line widths. See #3709.
2017-06-01Add \colorbox supportMarc Schreiber2-60/+127
2017-05-31Org reader: recognize babel result blocks with attributesAlbert Krewinkel1-0/+44
Babel result blocks can have block attributes like captions and names. Result blocks with attributes were not recognized and were parsed as normal blocks without attributes. Fixes: #3706
2017-05-29LaTeX reader: handle escaped & inside table cell.John MacFarlane1-0/+15
Closes #3708.
2017-05-27Markdown writer: changes to `--reference-links`.John MacFarlane1-0/+60
With `--reference-location` of `section` or `block`, pandoc will now repeat references that have been used in earlier sections. The Markdown reader has also been modified, so that *exactly* repeated references do not generate a warning, only references with the same label but different targets. The idea is that, with references after every block, one might want to repeat references sometimes. Closes #3701.
2017-05-25Allow em for image height/width in HTML, LaTeX.John MacFarlane2-24/+36
- Export `inEm` from ImageSize [API change]. - Change `showFl` and `show` instance for `Dimension` so extra decimal places are omitted. - Added `Em` as a constructor of `Dimension` [API change]. - Allow `em`, `cm`, `in` to pass through without conversion in HTML, LaTeX. Closes #3450.
2017-05-25Added `spaced_reference_links` extension.John MacFarlane1-0/+18
This is now the default for pandoc's Markdown. It allows whitespace between the two parts of a reference link: e.g. [a] [b] [b]: url This is now forbidden by default. Closes #2602.
2017-05-25Update command tests to include stderr output.John MacFarlane7-5/+23
2017-05-25MediaWiki reader: don't do curly quotes inside `<tt>` contexts.John MacFarlane1-0/+16
Even if `+smart`. See #3585.
2017-05-24Markdown reader: fixed smart quotes after emphasis.John MacFarlane1-0/+6
E.g. in *foo*'s 'foo' Closes #2228.
2017-05-24Parsing: Provide parseFromString'.John MacFarlane1-0/+8
This is a verison of parseFromString specialied to ParserState, which resets stateLastStrPos at the end. This is almost always what we want. This fixes a bug where `_hi_` wasn't treated as emphasis in the following, because pandoc got confused about the position of the last word: - [o] _hi_ Closes #3690.
2017-05-23Add another test to make sure that textcolor parsing is working in the ↵Marc Schreiber1-0/+8
inside of a paragraph
2017-05-23Add suggestions of @jgm: parse bracketed stuff as inlinesMarc Schreiber1-0/+17