aboutsummaryrefslogtreecommitdiff
path: root/test
AgeCommit message (Collapse)AuthorFilesLines
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.
2017-02-28RST reader: implemented implicit internal header links.John MacFarlane1-0/+45
Cloess #3475.
2017-02-26RST reader: support scale and align attributes of images.John MacFarlane2-1/+12
Closes #2662.
2017-02-25Added test case for variables/metadata in Markdown writer.John MacFarlane1-0/+15
2017-02-25LaTeX reader: allow hspace and vspace to count as raw block or inline.John MacFarlane1-0/+56
Previously we would refuse to parse anything as raw inline if it was in the blockCommands list. Now we allow exceptions if they're listed under ignoreInlines in inlineCommands. This should make it easier e.g. to include an \hspace between two side-by-side raw LaTeX tables.
2017-02-23Updated table tests.John MacFarlane1-36/+36
2017-02-22When parsing raw LaTeX commands, include trailing space.John MacFarlane2-1/+7
Otherwise things like `\noindent foo` break and turn into `\noindentfoo`. Affects `-f latex+raw_tex` and `-f markdown` (and other formats that allow `raw_tex`). Closes #1773.
2017-02-21MediaWiki reader: ensure that list starts begin at left margin.John MacFarlane1-0/+58
Including when they're in tables or other list items. Closes #2606.
2017-02-21MediaWiki writer: Remove newline before `</ref>`.John MacFarlane1-7/+3
Closes #2652.
2017-02-21MediaWiki writer: add display attribute on `<math>` tags.John MacFarlane1-7/+7
This allows display math to be rendered properly. Closes #3452.
2017-02-21MediaWiki reader: fixed more table issues.John MacFarlane1-0/+109
Closes #2649.
2017-02-17Added warnings for non-rendered blocks to some writers.John MacFarlane1-1/+2
2017-02-15Fix indirect hyperlink targets. Closes #512.John MacFarlane1-0/+41
2017-02-15ZimWiki writer: removed internal formatting from note and table cells, ↵Alex Ivkin2-31/+27
because ZimWiki does not support it (#3446)
2017-02-13LaTeX reader: properly handle column prefixes/suffixes.John MacFarlane1-0/+24
For example, in \begin{tabular}{>{$}l<{$}>{$}l<{$} >{$}l<{$}} each cell will be interpreted as if it has a `$` before its content and a `$` after (math mode).
2017-02-12Add Org writer unit testsAlexander Krotov2-0/+27
2017-02-11RST reader/writer: properly handle table captions.John MacFarlane2-40/+37
Currently the support for the `.. table` directive is a bit limited; we don't yet support the `widths` field. But at least you can have a proper captioned table.
2017-02-11Fixed small bug in RST list parsing.John MacFarlane1-0/+19
See #3432. Previously the parser didn't handle properly this case: * - a - b * - c - d
2017-02-11Use new warnings throughout the code base.John MacFarlane1-1/+1
2017-02-06Removed --parse-raw and readerParseRaw.John MacFarlane2-1/+28
These were confusing. Now we rely on the +raw_tex or +raw_html extension with latex or html input. Thus, instead of --parse-raw -f latex we use -f latex+raw_tex and instead of --parse-raw -f html we use -f html+raw_html
2017-02-06Use unicode-math by default in default.latex template.John MacFarlane4-20/+4
mathspec will be used in xelatex if the `mathspec` variable is set; otherwise unicode-math will be used. Thanks to Václav Haisman.
2017-02-05Handle language in inline code with --listings.John MacFarlane1-0/+9
Closes #3422.
2017-02-04More smart escaping tests.John MacFarlane1-0/+20
2017-02-04Consolidated some common functions in Tests.Helper.John MacFarlane3-81/+52
2017-02-04Added first command test to cabal metadata and repo.John MacFarlane1-0/+25
2017-02-04Org writer: reduce to two spaces after bulletsAlbert Krewinkel1-84/+84
The org writer was inserting two spaces after list bullets. Emacs Org-mode defaults to a single space, so behavior is changed to reflect this. Closes: #3417
2017-02-04Added new test framework Tests.Command.John MacFarlane2-19/+59
Any files added under test/command will be treated as shell tests (see smart.md for an example). This makes it very easy to add regression tests etc.
2017-02-04Added skeleton for Tests.Command.John MacFarlane2-0/+93
2017-02-04Moved tests/ -> test/.John MacFarlane326-0/+45138