aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Readers
AgeCommit message (Collapse)AuthorFilesLines
2017-12-21LaTeX reader: Fixed subtle bug in tokenizer.John MacFarlane1-2/+3
Material following `^^` was dropped if it wasn't a character escape. This only affected invalid LaTeX, so we didn't see it in the wild, but it appeared in a QuickCheck test failure https://travis-ci.org/jgm/pandoc/jobs/319812224
2017-12-21Muse reader: parse anchors immediately after headings as IDsAlexander Krotov1-5/+9
2017-12-20Org reader: fix asterisks-related parsing errorAlbert Krewinkel1-1/+1
A parsing error was fixed which caused the org reader to fail when parsing a paragraph starting with two or more asterisks. Fixes: #4180
2017-12-20Muse reader: require that note references does not start with 0Alexander Krotov1-1/+3
2017-12-19Muse reader: parse empty comments correctlyAlexander Krotov1-2/+1
2017-12-17OPML reader: enable raw HTML and other extensions by default for notes.John MacFarlane1-9/+14
This fixes a regression in 2.0. Note that extensions can now be individually disabled, e.g. `-f opml-smart-raw_html`. Closes #4164.
2017-12-15LaTeX reader: export tokenize, untokenize.John MacFarlane1-1/+3
Mainly so they can be tested.
2017-12-15Fixed regression in LateX tokenization.John MacFarlane1-2/+2
This mainly affects the Markdown reader when parsing raw LaTeX with escaped spaces. Closes #4159.
2017-12-14RST reader: more accurate parsing of references.John MacFarlane1-36/+24
Previously we erroneously included the enclosing backticks in a reference ID (closes #4156). This change also disables interpretation of syntax inside references, as in docutils. So, there is no emphasis in `my *link*`_
2017-12-14Markdown reader: be pickier about table captions.John MacFarlane1-1/+1
A caption starts with a `:` which can't be followed by punctuation. Otherwise we can falsely interpret the start of a fenced div, or even a table header line like `:--:|:--:`, as a caption.
2017-12-13Docx writer: Continue lists after interruption.Jesse Rosenthal1-15/+22
Docx expects that lists will continue where they left off after an interruption and introduces a new id if a list is starting again. So we keep track of the state of lists and use them to define a "start" attribute, if necessary. Closes #4025
2017-12-13Markdown reader: always use four space rule for example lists.John MacFarlane1-9/+16
It would be awkward to indent example list contents to the first non-space character after the label, since example list labels are often long. Thanks to Bernhard Fisseni for the suggestion.
2017-12-12Markdown: Improved computation of relative cell widths in pipe tables.John MacFarlane1-1/+1
2017-12-12Pipe tables: use full text width for tables with wrapping cells.John MacFarlane1-2/+2
Previously we computed the column sizes based on the ratio between the header lines and the text width (as set by `--columns`). This meant that tables with very short header lines would be very narrow. With this change, pipe tables with wrapping cells will always take up the whole text width. The relative column widths will still be determined by the ratio of header lines, but they will be normalized to add up to 1.0.
2017-12-08LaTeX reader: fix \ before newline.John MacFarlane1-3/+14
This should be a nonbreaking space, as long as it's not followed by a blank line. This has been fixed at the tokenizer level. Closes #4134.
2017-12-06Markdown reader: accept processing instructions as raw HTML.John MacFarlane1-2/+3
Closes #4125.
2017-12-06hlint Muse reader and testsAlexander Krotov1-4/+4
2017-12-06Muse reader: don't allow emphasis to be preceded by letterAlexander Krotov1-2/+12
2017-12-05Muse reader: support multiline directives in Amusewiki modeAlexander Krotov1-4/+24
2017-12-04Markdown reader: Don't parse native div as table caption.John MacFarlane1-1/+1
Closes #4119.
2017-12-04Add `empty_paragraphs` extension.John MacFarlane2-5/+13
* Deprecate `--strip-empty-paragraphs` option. Instead we now use an `empty_paragraphs` extension that can be enabled on the reader or writer. By default, disabled. * Add `Ext_empty_paragraphs` constructor to `Extension`. * Revert "Docx reader: don't strip out empty paragraphs." This reverts commit d6c58eb836f033a48955796de4d9ffb3b30e297b. * Implement `empty_paragraphs` extension in docx reader and writer, opendocument writer, html reader and writer. * Add tests for `empty_paragraphs` extension.
2017-12-04Muse reader: add underline support in Emacs Muse modeAlexander Krotov1-1/+7
2017-12-02Docx reader: don't strip out empty paragraphs.John MacFarlane1-3/+1
We now have the `--strip-empty-paragraphs` option for that, if you want it. Closes #2252. Updated docx reader tests. We use stripEmptyParagraphs to avoid changing too many tests. We should add new tests for empty paragraphs.
2017-11-29Support beamer `\alert` in LaTeX reader. Closes #4091.John MacFarlane1-0/+1
2017-11-29Muse reader: correctly remove indentation from notesAlexander Krotov1-2/+2
Exactly one space is required and considered to be part of the marker.
2017-11-27Muse reader: parse "~~" as non-breaking space in Emacs modeAlexander Krotov1-0/+7
2017-11-27Muse reader: make code blocks round tripAlexander Krotov1-8/+16
2017-11-26Muse reader: drop common space prefix from list itemsAlexander Krotov1-11/+17
2017-11-25Fix comment typo: s/elemnet/element/Alexander Krotov1-1/+1
2017-11-25Muse reader: don't interpret XML entitiesAlexander Krotov1-6/+5
2017-11-25Muse reader: remove `nested`Alexander Krotov1-11/+2
2017-11-24Muse reader: parse markup in definition list termsAlexander Krotov1-2/+4
2017-11-24Muse reader: allow definition to end with EOFAlexander Krotov1-1/+1
2017-11-24Muse: move inline list normalization to writerAlexander Krotov1-18/+4
2017-11-22Org reader: allow empty list itemsAlbert Krewinkel2-45/+42
Fixes: #4090
2017-11-22Muse reader: allow list items to be emptyAlexander Krotov1-2/+2
2017-11-22Muse reader: don't allow blockquotes within listsAlexander Krotov1-1/+2
2017-11-22Muse reader: fix reading of multiline definitionsAlexander Krotov1-2/+2
2017-11-22Muse reader: concatenate inlines of the same typeAlexander Krotov1-4/+18
2017-11-21Muse reader: add inline <literal> supportAlexander Krotov1-0/+11
2017-11-21Muse reader: chop newlines after <literal> and before </literal>Alexander Krotov1-9/+13
2017-11-21Muse reader: <literal> has "style" attribute, not "format"Alexander Krotov1-1/+2
2017-11-19Muse reader: count only one space as part of list item markerAlexander Krotov1-2/+2
2017-11-19Muse reader: produce SoftBreaks on newlinesAlexander Krotov1-18/+28
Now wrapping can be preserved with --wrap=preserve
2017-11-18HTML reader: ensure we don't produce level 0 headers,John MacFarlane1-5/+5
even for chapter sections in epubs. This causes problems because writers aren't set up to expect these. This fixes the most immediate problem in #4076. It would be good to think more about how to propagate the information that top-level headers are chapters from the reader to the writer.
2017-11-18Muse reader: Add Text::Amuse footnote extensionsAlexander Krotov1-6/+29
Footnote end is indicated by indentation, so footnotes can be placed anywhere in the text, not just at the end of it.
2017-11-16Introduce `HasSyntaxExtensions` typeclass (#4074)Alexander1-13/+9
+ Added new `HasSyntaxExtensions` typeclass for `ReaderOptions` and `WriterOptions`. + Reimplemented `isEnabled` function from `Options.hs` to accept both `ReaderOptions` and `WriterOptions`. + Replaced `enabled` from `CommonMark.hs` with new `isEnabled`.
2017-11-15Creole reader: Fix performance issue for longer lists. (#4075)Sascha Wilde1-1/+1
Fixes #4067.
2017-11-14RST reader: better support for 'container' directive.John MacFarlane1-1/+3
Create a div, incorporate name attribute and classes. Closes #4066.
2017-11-13LaTeX reader: allow optional arguments on `\footnote`.John MacFarlane1-2/+2
Closes #4062.