aboutsummaryrefslogtreecommitdiff
path: root/test
AgeCommit message (Collapse)AuthorFilesLines
2017-03-21Plain writer: use _(..) or ^(..) for super/subscript...John MacFarlane2-3/+3
...unless unicode super/subscripted characters are available.
2017-03-21Improve rendering of superscript in plain output.John MacFarlane1-0/+6
We now handle a few non digit characters (+, -, =, parentheses) for which there are superscripted unicode characters. Closes #3518.
2017-03-21RST writer: improve grid table output, fix bug with empty rows.John MacFarlane3-36/+51
Uses the new gridTable in Writers.Shared, which is here improved to better handle 0-width cells. Closes #3516.
2017-03-20Add `space_in_atx_header` extension.John MacFarlane1-0/+13
This is enabled by default in pandoc and GitHub markdown but not the other flavors. This requirse a space between the opening #'s and the header text in ATX headers (as CommonMark does but many other implementations do not). This is desirable to avoid falsely capturing things ilke #hashtag or #5 Closes #3512.
2017-03-20Lua filters (#3514)Albert Krewinkel5-0/+62
* Add `--lua-filter` option. This works like `--filter` but takes pathnames of special lua filters and uses the lua interpreter baked into pandoc, so that no external interpreter is needed. Note that lua filters are all applied after regular filters, regardless of their position on the command line. * Add Text.Pandoc.Lua, exporting `runLuaFilter`. Add `pandoc.lua` to data files. * Add private module Text.Pandoc.Lua.PandocModule to supply the default lua module. * Add Tests.Lua to tests. * Add data/pandoc.lua, the lua module pandoc imports when processing its lua filters. * Document in MANUAL.txt.
2017-03-19Removed failing part of 3348 test.John MacFarlane1-16/+0
This was failing because of a small discrepancy in markdown table header line lengths on appveyor. It's a minor issue, I can't see what is causing it, and it's irrelevant to the issue this is testing, so we'll just write native for this test.
2017-03-18HTML reader: Better sanity checks on raw HTML.John MacFarlane1-0/+13
This also affects the Markdown reader. Closes #3257.
2017-03-17Added test case to 3348 to try to figure out why appveyor build fails.John MacFarlane1-0/+18
2017-03-17Adjust command test 3348.md to specify column width.John MacFarlane1-1/+1
This is meant to address a test failure on appveyor.
2017-03-16Added test for #256.John MacFarlane2-0/+14
2017-03-15OpenDocument writer: use more widely available bullet characters.John MacFarlane1-102/+102
The old characters weren't available in some font sets. These seem to work well on Windows and Linux versions of LibreOffice. Closes #1400.
2017-03-15Use tasty-golden for golden tests in Old.John MacFarlane1-39/+52
2017-03-14Command tests: just findPandoc once.John MacFarlane1-4/+4
2017-03-14Removed unneeded import.John MacFarlane1-1/+0
2017-03-14Got rid of distracting warning in test output.John MacFarlane1-2/+2
2017-03-14Small test plumbing improvement.John MacFarlane1-11/+11
2017-03-14Use tasty for tests rather than test-framework.John MacFarlane27-137/+132
2017-03-13Better handling of \part in LaTeX.John MacFarlane1-0/+30
Closes #1905. Removed stateChapters from ParserState. Now we parse chapters as level 0 headers, and parts as level -1 headers. After parsing, we check for the lowest header level, and if it's less than 1 we bump everything up so that 1 is the lowest header level. So `\part` will always produce a header; no command-line options are needed.
2017-03-13Put TEI writer inside PandocMonad. Added warnings for omitted raw elements.John MacFarlane1-31/+31
Also added identifiers on `<div>` elements. These were commented out before, not sure why?
2017-03-12Improved behavior of `auto_identifiers` when there are explicit ids.John MacFarlane1-0/+13
Previously only autogenerated ids were added to the list of header identifiers in state, so explicit ids weren't taken into account when generating unique identifiers. Duplicated identifiers could result. This simple fix ensures that explicitly given identifiers are also taken into account. Fixes #1745. Note some limitations, however. An autogenerated identifier may still coincide with an explicit identifier that is given for a header later in the document, or with an identifier on a div, span, link, or image. Fixing this would be much more difficult, because we need to run `registerHeader` before we have the complete parse tree (so we can't get a complete list of identifiers from the document by walking the tree). However, it might be worth issuing warnings for duplicate header identifiers; I think we can do that. It is not common for headers to have the same text, and the issue can always be worked around by adding explicit identifiers, if the user is aware of it.
2017-03-11Changed test case labeled 3384.md to 3348.md.John MacFarlane1-0/+0
The last commit referred to #3384, but should have closed #3348.
2017-03-11Markdown writer: fixed bugs in simple/multiline list output.John MacFarlane1-0/+15
* Previously we got overlong lists with `--wrap=none`. This is fixed. * Previously a multiline list could become a simple list (and would always become one with `--wrap=none`). Closes #3384.
2017-03-10Add Muse writer (#3489)Alexander Krotov5-0/+1096
* Add Muse writer * Advertise new Muse writer * Muse writer: add regressions tests
2017-03-10Expand \newenvironment macros.John MacFarlane1-0/+12
Closes #987. Depends on still unreleased texmath 0.9.3.
2017-03-09HTML writer: fallback to basename rather than Untitled.John MacFarlane2-2/+2
2017-03-08Org reader: disallow tables on list marker linesAlbert Krewinkel1-1/+10
Fixes: #3499
2017-03-08Markdown writer: Avoid spurious blanklines at end of document...John MacFarlane6-17/+5
after tables and list, for example.
2017-03-08Markdown writer: ensure space before list at top level.John MacFarlane1-0/+13
Closes #3487.
2017-03-08Org reader: don't allow tables inside list items.John MacFarlane1-0/+9
Closes #3499.
2017-03-08Added test case for #3497.John MacFarlane1-0/+51
2017-03-07Speed up Native writer quickcheck tests.John MacFarlane1-2/+4
2017-03-07Small change to unbalanced bracket test to speed up test suite.John MacFarlane1-1/+1
2017-03-07Markdown reader: Treat certain environments as inlineJohn MacFarlane1-0/+52
when they occur without space surrounding them. E.g. equation, math. This avoids incorrect vertical space around equations. Closes #3309. Closes #2171. See also rstudio/bookdown#358.
2017-03-06Markdown writer: better handling of tables with empty columns.John MacFarlane1-0/+16
E.g. an HTML table with two cells in the first row and one in the second (but no row/colspan). We now calculate the number of columns based on the longest row (or the length of aligns or widths). Closes #3337.
2017-03-06LaTeX reader: allow newpage, clearpage, pagebreak in inline contextsJohn MacFarlane1-0/+40
as well as block contexts. Closes #3494.
2017-03-05Markdown reader: fixed internal header links.John MacFarlane1-0/+9
Closes #2397. This patch also adds `shortcut_reference_links` to the list of mmd extensions.
2017-03-05Added a markdown abbrevation test case.John MacFarlane1-0/+31
2017-03-05Markdown reader: Fixed regression on left-biased union for metadata.John MacFarlane1-0/+15
When multiple YAML metadata blocks are used, and two define the same field, the value defined first takes precedence, according to the manual. This was changed briefly in ba3ee62323644134f2a5dd3277e3349d3681111a. This commit reverts to the original behavior and adds a test case.
2017-03-05Parse YAML metadata in a context that sees footnotes...John MacFarlane1-0/+19
defined in the body of the document. Closes #1279.
2017-03-04Regularized CSS in html/epub/html slide templates.John MacFarlane7-7/+28
All templates now include `code{white-space: pre-wrap}` and CSS for `q` if `--html-q-tags` is used. Previously some templates had `pre` and others `pre-wrap`; the `q` styles were only sometimes included. See #3485.
2017-03-04Fixed some loose ends in #1592.John MacFarlane1-0/+49
Added test cases. Fixed HTML reader to parse a span with class "smallcaps" as SmallCaps. Fixed Markdown writer to render SmallCaps as a native span when native spans are enabled.
2017-03-04templates: CSS for .smallcaps, closes #1592 (#3485)Mauro Bieg7-7/+7
2017-03-04Stylish-haskell automatic formatting changes.John MacFarlane25-133/+126
2017-03-04HTML writer: issue warning if no title specified and template used.John MacFarlane2-2/+2
See #3473.
2017-03-04Make default.html5 polyglot markup conformant. (#3473)John Luke Bentley3-15/+15
Polyglot markup is HTML5 that is also valid XHTML. See <https://www.w3.org/TR/html-polyglot>. With this change, pandoc's html5 writer creates HTML that is both valid HTML5 and valid XHTML. See jgm/pandoc-templates#237 for prior discussion. * Add xml namespace to `<html>` element. * Make all `<meta>` elements self closing. See <https://www.w3.org/TR/html-polyglot/#empty-elements>. * Add `xml:lang` attribute on `<html>` element, defaulting to blank, and always include `lang` attribute, even when blank. See <https://www.w3.org/TR/html-polyglot/#language-attributes>. * Update test files for template changes. The key justification for having language values default to blank: it turns out the HTML5 spec requires it (as I read it). Under [the HTML5 spec, section "3.2.5.3. The lang and xml:lang attributes"](https://www.w3.org/TR/html/dom.html#the-lang-and-xmllang-attributes), providing attributes with blank contents both: * Has meaning, "unknown", and * Is a MUST (written as "must") if a language value is not provided ... > The lang attribute (in no namespace) specifies the primary language > for the element's contents and for any of the element's attributes that > contain text. Its value must be a valid BCP 47 language tag, or the > empty string. Setting the attribute to the empty string indicates that > the primary language is unknown. In short, it seems that where a language value is not provided then a blank value MUST be provided for Polyglot Markup conformance, because the HTML5 spec stipulates a "must". So although the Polyglot Markup spec is unclear on this issue it would seem that if it was correctly written, it would therefore require blank attributes. Further justifications are found at https://github.com/jgm/pandoc-templates/issues/237#issuecomment-275584181 (but the HTML5 spec justification given above would seem to be the clincher). In addition to having lang-values-default-to-blank I recommend that, when an author does not provide a lang value, then upon on pandoc command execution a warning message like the following be provided: > Polyglot markup stipulates that 'The root element SHOULD always specify > the language'. It is therefore recommended you specify a language value in > your source document. See > <https://www.w3.org/International/articles/language-tags/> for valid > language values.
2017-03-03OpenDocument writer: fixed dropped elements in some ordered lists.John MacFarlane1-0/+59
Closes #2434.
2017-03-03RST reader: support RST-style citations.John MacFarlane1-0/+18
The citations appear at the end of the document as a definition list in a special div with id `citations`. Citations link to the definitions. Added stateCitations to ParserState. Closes #853.
2017-03-02RST reader: Handle multiline cells in simple tables.John MacFarlane1-0/+48
Closes #1166.
2017-03-01LaTeX writer: always add hypertarget when there's a non-empty identifier.John MacFarlane5-38/+75
Previously the hypertargets were only added when there was actually a link to that identifier. Closes #2719.
2017-03-01Markdown writer: Fixed grid tables embedded in grid tables.John MacFarlane1-0/+32
Closes #2834.