aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Readers
AgeCommit message (Collapse)AuthorFilesLines
2018-09-19hlint Muse readerAlexander Krotov1-6/+5
2018-09-19Muse reader: get rid of HTML parser dependencyAlexander Krotov1-5/+13
2018-09-19Muse reader: use openTag and closeTag everywhereAlexander Krotov1-4/+4
2018-09-19Muse reader: make openTag return association listAlexander Krotov1-5/+5
2018-09-19Muse reader: add openTag and closeTag functionsAlexander Krotov1-18/+19
2018-09-18parse rST inlines containing newlines closing #4912danse1-1/+1
this eliminates a regression error introduced after pandoc 2.1.1, affecting rST inline parsing. see the issue for details
2018-09-16Markdown reader: example_lists should work without startnum.John MacFarlane1-1/+3
Closes #4908.
2018-09-15introduce --metadata-file optionmb211-2/+14
closes #1960 API change: Text.Pandoc.Readers.Markdown exports now `yamlToMeta`
2018-09-15Markdown Reader: factor out yamlMapmb211-40/+27
2018-09-15Markdown Reader: factor out yamlBsToMetamb211-4/+8
2018-09-15Markdown Reader: rename yamlToMeta to yamlToMetaValuemb211-9/+9
2018-09-09LaTeX reader: resolve `\ref` for figure numbers.John MacFarlane1-12/+41
2018-09-07HTML reader: parse `<script type="math/tex` tags as math.John MacFarlane1-0/+12
These are used by MathJax. Closes #4877.
2018-09-06Org reader: respect export option `p` for planning infoAlbert Krewinkel3-2/+28
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-06Org reader internals: disable some GHC extensionsAlbert Krewinkel1-26/+32
The RecordWildCards and ViewPatterns language extensions can be used to shorten code, but usually also makes it harder to read. The DocumentTree module was hence refactored and no longer relies on these extensions.
2018-09-05Org reader: strip planning info from outputAlbert Krewinkel1-1/+35
Planning info is parsed, but not included in the output (as is the default with Emacs Org-mode). Fixes: #4867
2018-09-02Muse reader: autonumber sections in the correct orderAlexander Krotov1-4/+16
Parsing now stops at each section header to ensure the header is registered before parsing of the next section starts.
2018-09-02Muse reader: move duplicate code into "headingStart" functionAlexander Krotov1-9/+10
2018-09-02Muse reader: allow newline after opening "*" or "**"Alexander Krotov1-1/+9
Emacs Muse allows this.
2018-08-31Muse reader: parse <verse> tag in one passAlexander Krotov1-8/+11
instead of using parseFromString. This change makes it possible to have verbatim </verse> tag inside verse.
2018-08-30Muse reader: hlintAlexander Krotov1-2/+2
2018-08-29LaTeX reader: fixed parsing of \texorpdfstring.John MacFarlane1-1/+1
We were returning the wrong argument as the content.
2018-08-29RSTR reader: don't skip link definitions after comments.John MacFarlane1-0/+1
Closes #4860.
2018-08-24HTML reader: allow enabling `raw_tex` extension.John MacFarlane1-3/+28
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-3/+3
Fixes #4845
2018-08-21LaTeX reader: support blockcquote, foreignblockquote from csquotes.John MacFarlane1-5/+19
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-6/+24
from csquotes. See #4848. Still TBD: blockquote, blockcquote, foreignblockquote.
2018-08-18Fix compiler warning.John MacFarlane1-1/+1
2018-08-17LaTeX reader: Support more text-mode accents.John MacFarlane1-1/+91
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-17LaTeX reader: use combining characters when needed for accents.John MacFarlane1-1/+4
For example, there is no unicode code point corresponding to \"{X}, so we use a combining accent.
2018-08-17Add support for latex mintinline (#4365)Marc Schreiber1-0/+11
2018-08-17LaTeX reader: fix siunitx unit commands...John MacFarlane1-174/+182
...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-16LaTeX reader: fix double `unnumbered` class.John MacFarlane1-21/+20
The `unnumbered` class was being included twice for starred sections. Closes #4838.
2018-08-15Markdown reader: Use "tex" instead of "latex" for raw tex-ish content.John MacFarlane1-7/+3
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-14ODT reader: deal gracefully with missing `<office:font-face-decls/>`.John MacFarlane1-1/+1
This allows pandoc to parse ODT document produced by KDE's Calligra. Closes #4336.
2018-08-14LaTeX reader: handle parameter patterns for `\def`.John MacFarlane2-23/+50
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-12LaTeX reader: Allow `%` characters in URLs.John MacFarlane1-13/+31
This affects `\href` and `\url`. Closes #4832.
2018-08-12Muse reader: don't allow digits after closing marker in lightweight markupAlexander Krotov1-2/+2
This change makes reader more compatible with Emacs Muse
2018-08-10Avoid non-exhaustive pattern match.John MacFarlane1-2/+4
2018-08-10Avoid non-exhaustive pattern match.John MacFarlane1-3/+1
2018-08-10Avoid non-exhaustive pattern match.John MacFarlane1-2/+3
2018-08-10Avoid a non-exhaustive pattern match.John MacFarlane1-3/+2
2018-08-07Markdown reader: Properly handle boolean values in YAML metadata.John MacFarlane1-1/+12
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-24/+22
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 MacFarlane1-12/+28
* 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-07-30Markdown reader: allow unquoted numbers, booleans as YAML mapping keys.John MacFarlane1-26/+28
Previously in 2.2.2 you could not do --- 0: bar ... but only --- '0': bar ... With this change, both forms work.
2018-07-30Use YAML.decode rather than YAML.decodeStrict.John MacFarlane1-1/+1
(Minor)
2018-07-30DocBook reader: metadata handling improvements.John MacFarlane1-38/+28
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-24RST reader: remove support for nested inlines.danse1-17/+15
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-23Org reader: fix parsers relying on parseFromStringAlbert Krewinkel1-4/+3
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