aboutsummaryrefslogtreecommitdiff
path: root/test/command
AgeCommit message (Collapse)AuthorFilesLines
2017-10-16Revised command test 3971 to work with Windows.John MacFarlane1-2/+2
2017-10-16Improved handling of include files in LaTeX reader.John MacFarlane2-0/+11
Previously `\include` wouldn't work if the included file contained, e.g., a begin without a matching end. We've changed the Tok type so that it stores a full SourcePos, rather than just a line and column. So tokens keeep track of the file they came from. This allows us to use a simpler method for includes, which doesn't require parsing the included document as a whole. Closes #3971.
2017-10-16RST writer: correctly handle inline code containing backticks.John MacFarlane1-0/+6
(Use a :literal: role.) Closes #3974.
2017-10-16RST writer: don't backslash-escape word-internal punctuation.John MacFarlane1-0/+6
Closes #3978.
2017-10-11ConTeXt writer: Use identifiers for chapters.John MacFarlane1-0/+9
Closes #3968.
2017-10-08Add test - closes #3958.John MacFarlane1-0/+20
2017-10-02Markdown reader: Fixed bug with indented code following raw LaTeX.John MacFarlane1-0/+11
Closes #3947.
2017-09-27RST writer: add header anchors when header has non-standard id.John MacFarlane1-0/+13
Closes #3937.
2017-09-17Added `--strip-comments` option, `readerStripComments` in `ReaderOptions`.John MacFarlane1-0/+14
* Options: Added readerStripComments to ReaderOptions. * Added `--strip-comments` command-line option. * Made `htmlTag` from the HTML reader sensitive to this feature. This affects Markdown and Textile input. Closes #2552.
2017-09-12Textile reader: allow 'pre' code in list item.John MacFarlane1-0/+11
Closes #3916.
2017-09-07Markdown writer: Escape pipe characters when `pipe_tables` enabled.John MacFarlane1-1/+1
Closes #3887.
2017-09-01Org writer: stop using raw HTML to wrap divsAlbert Krewinkel1-0/+14
Div's are difficult to translate into org syntax, as there are multiple div-like structures (drawers, special blocks, greater blocks) which all have their advantages and disadvantages. Previously pandoc would use raw HTML to preserve the full div information; this was rarely useful and resulted in visual clutter. Div-rendering was changed to discard the div's classes and key-value pairs if there is no natural way to translate the div into an org structure. Closes: #3771
2017-08-27RST reader: Fixed `..include::` directive.John MacFarlane2-0/+7
Closes #3880.
2017-08-25LaTeX reader: improved support for \hyperlink, \hypertarget.John MacFarlane1-0/+38
Closes #2549.
2017-08-20Use pandoc-types 1.17.1. Tests updated for new simpleTable behavior...John MacFarlane2-2/+6
with empty headers.
2017-08-20LaTeX reader: Set identifiers on Spans used for \label.John MacFarlane1-1/+1
2017-08-19Markdown reader: use CommonMark rules for list item nesting.John MacFarlane2-1/+47
Closes #3511. Previously pandoc used the four-space rule: continuation paragraphs, sublists, and other block level content had to be indented 4 spaces. Now the indentation required is determined by the first line of the list item: to be included in the list item, blocks must be indented to the level of the first non-space content after the list marker. Exception: if are 5 or more spaces after the list marker, then the content is interpreted as an indented code block, and continuation paragraphs must be indented two spaces beyond the end of the list marker. See the CommonMark spec for more details and examples. Documents that adhere to the four-space rule should, in most cases, be parsed the same way by the new rules. Here are some examples of texts that will be parsed differently: - a - b will be parsed as a list item with a sublist; under the four-space rule, it would be a list with two items. - a code Here we have an indented code block under the list item, even though it is only indented six spaces from the margin, because it is four spaces past the point where a continuation paragraph could begin. With the four-space rule, this would be a regular paragraph rather than a code block. - a code Here the code block will start with two spaces, whereas under the four-space rule, it would start with `code`. With the four-space rule, indented code under a list item always must be indented eight spaces from the margin, while the new rules require only that it be indented four spaces from the beginning of the first non-space text after the list marker (here, `a`). This change was motivated by a slew of bug reports from people who expected lists to work differently (#3125, #2367, #2575, #2210, #1990, #1137, #744, #172, #137, #128) and by the growing prevalance of CommonMark (now used by GitHub, for example). Users who want to use the old rules can select the `four_space_rule` extension. * Added `four_space_rule` extension. * Added `Ext_four_space_rule` to `Extensions`. * `Parsing` now exports `gobbleAtMostSpaces`, and the type of `gobbleSpaces` has been changed so that a `ReaderOptions` parameter is not needed.
2017-08-18Markdown reader: fixed parsing of fenced code after list...John MacFarlane1-0/+13
...when there is no intervening blank line. Closes #3733.
2017-08-18LaTeX reader: implement \newtoggle, \iftoggle, \toggletrue|falseJohn MacFarlane1-0/+26
from etoolbox. Closes #3853.
2017-08-17RST reader/writer: support unknown interpreted text roles...John MacFarlane1-0/+13
...by parsing them as Span with "role" attributes. This way they can be manipulated in the AST. Closes #3407.
2017-08-17HTML reader: support column alignments.John MacFarlane1-0/+52
These can be set either with a `width` attribute or with `text-width` in a `style` attribute. Closes #1881.
2017-08-16LaTeX reader: use Link instead of Span for `\ref`.John MacFarlane1-6/+6
This makes more sense semantically and avoids unnecessary Span [Link] nestings when references are resolved.
2017-08-16LaTeX reader: add Support for `glossaries` and `acronym` package (#3589)schrieveslaach1-0/+45
Acronyms are not resolved by the reader, but acronym and glossary information is put into attributes on Spans so that they can be processed in filters.
2017-08-16Fixed command test #2994 on Windows.John MacFarlane1-1/+1
2017-08-14Implement multicolumn support for slide formats.John MacFarlane1-0/+91
The structure expected is: <div class="columns"> <div class="column" width="40%"> contents... </div> <div class="column" width="60%"> contents... </div> </div> Support has been added for beamer and all HTML slide formats. Closes #1710. Note: later we could add a more elegant way to create this structure in Markdown than to use raw HTML div elements. This would come for free with a "native div syntax" (#168). Or we could devise something specific to slides
2017-08-14Changed command test for #2994 so it actually tests the writer.John MacFarlane2-1/+4
2017-08-13Put content of \ref, \label commands into span… (#3639)schrieveslaach1-0/+54
* Put content of `\ref` and `\label` commands into Span elements so they can be used in filters. * Add support for `\eqref`
2017-08-13CommonMark writer: prefer pipe tables to HTML tables...John MacFarlane1-0/+11
...even if it means losing relative column width information. See #3734.
2017-08-13Markdown writer: Use pipe tables if `raw_html` disabled...John MacFarlane1-0/+39
and `pipe_tables` enabled, even if the table has relative width information. Closes #3734.
2017-08-12Docx writer: pass through comments.John MacFarlane2-0/+7
We assume that comments are defined as parsed by the docx reader: I want <span class="comment-start" id="0" author="Jesse Rosenthal" date="2016-05-09T16:13:00Z">I left a comment.</span>some text to have a comment <span class="comment-end" id="0"></span>on it. We assume also that the id attributes are unique and properly matched between comment-start and comment-end. Closes #2994.
2017-08-12Escape MetaString values (as added with --metadata flag).John MacFarlane1-0/+13
Previously they would be transmitted to the template without any escaping. Note that `--M title='*foo*'` yields a different result from --- title: *foo* --- In the latter case, we have emphasis; in the former case, just a string with literal asterisks (which will be escaped in formats, like Markdown, that require it). Closes #3792.
2017-08-12LaTeX reader: Fixed space after \figurename etc.John MacFarlane1-8/+16
2017-08-12Fixed data-dir on translations tests.John MacFarlane1-3/+3
2017-08-11More translation tests.John MacFarlane1-0/+8
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