aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Readers
AgeCommit message (Collapse)AuthorFilesLines
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
2018-07-21RST reader: fix double-link bug.John MacFarlane1-1/+8
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-1/+10
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-19rawLaTeXBlock: never retokenize macroDef.John MacFarlane1-1/+1
2018-07-15Wrap emojis in span nodes (#4759)Anders Waldenborg2-18/+21
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-15Support abbreviated units for siunitx (#4773).John MacFarlane1-0/+89
2018-07-15LaTeX reader: be more forgiving in key/value option parsing.John MacFarlane1-16/+39
We now allow arbitrary LaTeX values. This helps with #4761. The `\maxwidth` is still not propagated to the latex destination, but at least we don't choke on parsing.
2018-07-02JATS reader: fix typo ("lable" instead of "label")Alexander Krotov1-1/+1
2018-07-02Spellcheck commentsAlexander Krotov14-17/+17
2018-06-29Fix compiler warnings.John MacFarlane1-4/+4
2018-06-29Use HsYAML instead of yaml for translations, YAML metadata.John MacFarlane1-56/+46
yaml wraps a C library; HsYAML is pure Haskell. Closes #4747. Advances #4535.
2018-06-29CommonMark reader: Handle ascii_identifiers extension (#4733)Anders Waldenborg1-13/+18
Non-ascii characters were not stripped from identifiers even if the `ascii_identifiers` extension was enabled (which is is by default for gfm). Closes #4742
2018-06-28TikiWiki reader: improve list parsing (#4723)Mauro Bieg1-3/+4
- remove trailing Space from list items - parse lists that have no space after marker (fixes #4722)
2018-06-25LaTeX reader: Treat `lilypond` as a verbatim environment.John MacFarlane1-1/+2
Closes #4725.
2018-06-25Fixed typo in LaTeX writer.John MacFarlane1-1/+1
2018-06-13Markdown reader: allow empty code spans.John MacFarlane1-1/+1
E.g. `` ` ` ``.
2018-06-13LaTeX Reader: parse figure label into Image id (#4704)Mauro Bieg1-14/+20
closes #4700
2018-06-12LaTeX reader: allow spaces around `\graphicspath` arguments.John MacFarlane1-1/+2
Closes #4698.
2018-06-01LaTeX reader: handle includes without surrounding blanklines.John MacFarlane1-7/+9
In addition, `\input` can now be used in an inline context, e.g. to provide part of a paragraph, as it can in LaTeX. Closes #4553.
2018-06-01Muse reader: get rid of non-exhaustive pattern match warningmb211-1/+1
2018-05-31Muse reader: add support for floating imagesAlexander Krotov1-6/+18
2018-05-31Muse reader: add support for images with specified widthAlexander Krotov1-4/+9
2018-05-30Revert "ALlow compilation with haddock-library 1.4 and above."John MacFarlane1-14/+1
This reverts commit 50c71b5bc5db797ac46550ed54e91196269716e3. This was a bad idea, since tests depend on recent haddock-library. We'd be able to build but fail tests.
2018-05-30ALlow compilation with haddock-library 1.4 and above.John MacFarlane1-1/+14
haddock-library-1.6 requires Cabal >= 2.0. This change allows systems with older Cabal versions to build pandoc.
2018-05-30LaTeX reader `rawLaTeXBlock`: handle macros that resolve to a...John MacFarlane1-1/+17
...`\begin` or `\end`. Fixes #4667.
2018-05-30LaTeX reader: tighten up reading of beamer overlay specifications.John MacFarlane1-9/+20
Ideally we'd turn these on only when reading beamer, but currently beamer is not distinguished from latex as an input format. This commit also activates parsing of overlay specifications after commands in general (e.g. `\item`), since they can occur in many contexts in beamer. Closes #4669.
2018-05-30Muse reader: parse image URLs without "guard" and "takeExtension"Alexander Krotov1-5/+3
2018-05-28Muse reader: split link and image parsing into separate functionsAlexander Krotov1-10/+17
2018-05-27Muse reader: parse links starting with "URL:" explicitlyAlexander Krotov1-12/+19
instead of trying to strip "URL:" prefix after parsing.
2018-05-27custom ordered listsYan Pas1-16/+26
2018-05-26nested listsYan Pas1-52/+84
2018-05-26escape chars in macrosYan Pas1-49/+66
2018-05-23tests, parsing fixesYan Pas1-16/+19
2018-05-20Use haddock-library 1.6.0.John MacFarlane1-13/+1
2018-05-20listsYan Pas1-4/+20
2018-05-20links, specialcharsYan Pas1-39/+65
2018-05-20rename compile to parse, parse to lexYan Pas1-57/+57
2018-05-20states, code block compilingYan Pas1-35/+62
2018-05-20compiling paragraphsYan Pas1-55/+124
2018-05-19tokenisationYan Pas1-131/+175
2018-05-16LaTeX reader: parse more siunitx unit commands.John MacFarlane1-1/+73
Improves on earlier fix for #4296.
2018-05-15rawLaTeXBlock: don't expand macros in macro definitions!John MacFarlane1-11/+11
Closes #4653. Note that this only affected LaTeX in markdown. Added regression test.