aboutsummaryrefslogtreecommitdiff
path: root/test
AgeCommit message (Collapse)AuthorFilesLines
2018-09-11Muse writer: use tags instead of lightweight markup for empty stringsAlexander Krotov1-0/+4
2018-09-10Make HTML5 header easier to style precisely in default template (#4767)J. B. Rainsberger1-1/+1
Add the `title-block-header` identifier to the `header` element, to make it easier to style precisely.
2018-09-10Remove RawBlock from HTML round trip testsAlexander Krotov1-0/+1
2018-09-10HTML reader: test round trip propertyAlexander Krotov1-0/+23
2018-09-09LaTeX reader: resolve `\ref` for figure numbers.John MacFarlane1-1/+44
2018-09-09Org writer: don't escape literal `_`, `^`.John MacFarlane1-4/+4
Org doesn't recognize these escapes. Closes #4882.
2018-09-07HTML reader: parse `<script type="math/tex` tags as math.John MacFarlane1-0/+13
These are used by MathJax. Closes #4877.
2018-09-06Org reader: respect export option `p` for planning infoAlbert Krewinkel2-0/+36
Inclusion of planning info (*DEADLINE*, *SCHEDULED*, and *CLOSED*) can be controlled via the `p` export option: setting the option to `t` will add all planning information in a *Plain* block below the respective headline.
2018-09-06Muse reader: close the </quote> in indented tag testAlexander Krotov1-1/+2
There is already a separate test for unclosed </quote>.
2018-09-05Org reader: strip planning info from outputAlbert Krewinkel1-0/+25
Planning info is parsed, but not included in the output (as is the default with Emacs Org-mode). Fixes: #4867
2018-09-04hlint Muse writer testsAlexander Krotov1-6/+6
2018-09-04Remove redundant $Alexander Krotov1-1/+1
2018-09-02Muse reader: autonumber sections in the correct orderAlexander Krotov1-0/+12
Parsing now stops at each section header to ensure the header is registered before parsing of the next section starts.
2018-09-02Muse writer: use lightweight markup when possibleAlexander Krotov2-50/+75
2018-09-02Muse reader: allow newline after opening "*" or "**"Alexander Krotov1-0/+8
Emacs Muse allows this.
2018-08-31Muse reader: parse <verse> tag in one passAlexander Krotov1-0/+6
instead of using parseFromString. This change makes it possible to have verbatim </verse> tag inside verse.
2018-08-30Fix a typo: s/afeter/after/Alexander Krotov1-1/+1
2018-08-29RSTR reader: don't skip link definitions after comments.John MacFarlane1-0/+9
Closes #4860.
2018-08-24HTML reader: allow enabling `raw_tex` extension.John MacFarlane1-0/+29
This now allows raw LaTeX environments, `\ref`, and `\eqref` to be parsed (which is helpful for translation HTML documents using MathJaX). Closes #1126.
2018-08-22HTML reader: extract spaces inside links instead of trimming themAlexander Krotov1-0/+6
Fixes #4845
2018-08-21LaTeX reader: support blockcquote, foreignblockquote from csquotes.John MacFarlane1-3/+4
Also foreigncblockquote, hyphenblockquote, hyphencblockquote. Closes #4848. But note: currently foreignquote will be parsed as a regular Quoted inline (not using the quotes appropriate to the foreign language).
2018-08-21LaTeX reader: support enquote*, foreignquote, hypphenquote...John MacFarlane1-0/+58
from csquotes. See #4848. Still TBD: blockquote, blockcquote, foreignblockquote.
2018-08-17LaTeX reader: Support more text-mode accents.John MacFarlane1-4/+4
Add support for `\|`, `\b`, `\G`, `\h`, `\d`, `\f`, `\r`, `\t`, `\U`, `\i`, `\j`, `\newtie`, `\textcircled`. Also fall back to combining characters when composed characters are not available. Closes #4652.
2018-08-17Add support for latex mintinline (#4365)Marc Schreiber1-0/+22
2018-08-17Haddock Writer: Use proper format for latex math in haddock (#4571).Joe Hermaszewski1-7/+7
Inline math in `\(..\)`, display math in `\[..\]`, tex is now used. Previously we'd "fake it with unicode" and fall back to tex when that didn't work. But as of https://github.com/haskell/haddock/commit/3f50b955324bd4b42f88a421f0203bc46a3ccf64 haddock supports latex math.
2018-08-17LaTeX reader: fix siunitx unit commands...John MacFarlane1-0/+6
...they should only be recognized in siunitx contexts. For example, `\l` outside of an siunitx context should be l-slash, not l (for liter)! Closes #4842.
2018-08-16TEI template: improve publicationStmt.John MacFarlane1-2/+2
Add support for publisher, address, pubPlace, and date variables.
2018-08-15Markdown reader: Use "tex" instead of "latex" for raw tex-ish content.John MacFarlane14-20/+27
We can't always tell if it's LaTeX, ConTeXt, or plain TeX. Better just to use "tex" always. Also changed: ConTeXt writer: now outputs raw "tex" blocks as well as "context". (Closes #969). RST writer: uses ".. raw:: latex" for "tex" content. (RST doesn't support raw context anyway.) Note that if "context" or "latex" specifically is desired, you can still force that in a markdown document by using the raw attribute (see MANUAL.txt): ```{=latex} \foo ``` Note that this change may affect some filters, if they assume that raw tex parsed by the Markdown reader will be RawBlock (Format "latex"). In most cases it should be trivial to modify the filters to accept "tex" as well.
2018-08-14LaTeX reader: handle parameter patterns for `\def`.John MacFarlane1-0/+7
For example: `\def\foo#1[#2]{#1 and #2}`. Closes #4768. Also fixes #4771. API change: in Text.Pandoc.Readers.LaTeX.Types, new type ArgSpec added. Second parameter of Macro constructor is now `[ArgSpec]` instead of `Int`.
2018-08-13RST writer: render Divs with admonition classes as admonitions.John MacFarlane1-0/+20
Also omit Div with class "admonition-title". These are generated by the RST reader and should be omitted on round-trip. Closes #4833.
2018-08-13RST writer: use `.. container` for generic Divs, instead of raw HTML.John MacFarlane1-68/+14
2018-08-12LaTeX reader: Allow `%` characters in URLs.John MacFarlane1-0/+21
This affects `\href` and `\url`. Closes #4832.
2018-08-12Muse reader: don't allow digits after closing marker in lightweight markupAlexander Krotov1-0/+4
This change makes reader more compatible with Emacs Muse
2018-08-07Markdown reader: Properly handle boolean values in YAML metadata.John MacFarlane1-0/+50
This fixes a regression in 2.2.3, which cause boolean values to be parsed as MetaInlines instead of MetaBool. Note also an undocumented (but desirable) change in 2.2.3: numbers are now parsed as MetaInlines rather than MetaString. Closes #4819.
2018-08-06Fix parsing of embedded mappings in YAML metadata.John MacFarlane1-0/+10
This fixes a regression in 2.2.3 which caused embedded mappings (e.g. mappings in sequences) not to work in YAML metadata. Closes #4817.
2018-08-05RST reader: improve parsing of inline interpreted text roles.John MacFarlane4-4/+52
* Use a Span with class "title-reference" for the default title-reference role. * Use B.text to split up contents into Spaces, SoftBreaks, and Strs for title-reference. * Use Code with class "interpreted-text" instead of Span and Str for unknown roles. (The RST writer has also been modified to round-trip this properly.) * Disallow blank lines in interpreted text. * Backslash-escape now works in interpreted text. * Backticks followed by alphanumerics no longer end interpreted text. Closes #4811.
2018-08-05Added test case for #4669 to repository.John MacFarlane1-0/+29
2018-08-01RST writer: use `titleblock` instead of `title` variable for title blockFrancesco Occhipinti1-0/+8
Closes #4803 After this commit use `$titleblock$` in order to get what was contained in `$title$` before, that is a title and subtitle rendered according to the official rST method: http://docutils.sourceforge.net/docs/user/rst/quickstart.html#document-title-subtitle. from With this commit, the `$title$` and `$subtitle$` metadata are available and they simply carry the metadata values. This opens up more possibilities in templates.
2018-07-30DocBook reader: metadata handling improvements.John MacFarlane1-1/+1
Now we properly parse title and subtitle elements that are direct children of book and article (as well as children of bookinfo, articleinfo, or info). We also now use the "subtitle" metadata field for subtitles, rather than tacking the subtitle on to the title.
2018-07-30Lua Utils module: add function blocks_to_inlines (#4799)Albert Krewinkel2-1/+17
Exposes a function converting which flattenes a list of blocks into a list of inlines. An example use case would be the conversion of Note elements into other inlines.
2018-07-24RST reader: remove support for nested inlines.danse2-6/+11
RST does not allow nested emphasis, links, or other inline constructs. Closes #4581, double parsing of links with URLs as link text. This supersedes the earlier fix for #4581 in 6419819b46c0d69c7024ba8aa4a6381cb311341c. Fixes #4561, a bug parsing with URLs inside emphasis. Closes #4792.
2018-07-24MediaWiki writer: Avoid extra blank line in tables with empty cells.John MacFarlane1-0/+18
Note that the old output is semantically identical, but the new output looks better. Closes #4794.
2018-07-23Org reader: fix parsers relying on parseFromStringAlbert Krewinkel1-0/+11
Emphasis was not parsed when it followed directly after some block types (e.g., lists). The org reader uses a wrapper for the `parseFromString` function to handle org-specific state. The last position of a character allowed before emphasis was reset incorrectly in this wrapper. Emphasized text was not recognized when placed directly behind a block which the reader parses using `parseFromString`. Fixes: #4784
2018-07-21RST reader: fix double-link bug.John MacFarlane1-0/+6
Link labels containing raw URLs were parsed as autolinks, but links within links are not allowed. Closes #4581.
2018-07-19Fix for bug in parsing `\include` in markdown.John MacFarlane1-0/+22
Starting in 2.2.2, everything after an `\input` (or `\include`) in a markdown file would be parsed as raw LaTeX. This commit fixes the issue and adds a regression test. Closes #4781.
2018-07-15Make markdown and github writers respect the `emoji` extension.John MacFarlane1-0/+27
2018-07-15Wrap emojis in span nodes (#4759)Anders Waldenborg3-2/+29
Text.Pandoc.Emoji now exports `emojiToInline`, which returns a Span inline containing the emoji character and some attributes with metadata (class `emoji`, attribute `data-emoji` with emoji name). Previously, emojis (as supported in Markdown and CommonMark readers, e.g ":smile:") were simply translated into the corresponding unicode code point. By wrapping them in Span nodes, we make it possible to do special handling such as giving them a special font in HTML output. We also open up the possibility of treating them differently when the `--ascii` option is selected (though that is not part of this commit). Closes #4743.
2018-07-12AsciiDoc Writer: escape square brackets at start of line (#4708)Mauro Bieg1-0/+20
closes #4545
2018-07-02More spellcheckAlexander Krotov9-7/+7
2018-06-30RST writer: don't treat 'example' as a syntax name.John MacFarlane1-0/+16
This fixes conversions from org with example blocks. Closes #4748.