aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc
AgeCommit message (Collapse)AuthorFilesLines
2018-02-13Muse reader: remove listItemContents functionAlexander Krotov1-12/+8
2018-02-13Muse reader: hlintAlexander Krotov1-7/+7
2018-02-13Muse reader: parse definition lists with multiple descriptionsAlexander Krotov1-14/+25
2018-02-13Muse reader: parse next list item before parsing more item contentsAlexander Krotov1-7/+10
2018-02-12Muse reader: refactor to avoid reparsingAlexander Krotov1-78/+195
Lists are parsed in linear instead of exponential time now. Contents of block tags, such as <quote>, is parsed directly, without storing it in a string and parsing with parseFromString. Fixed a bug: headers did not terminate lists.
2018-02-12Muse reader: move indentation parsing from definitionListItem to definitionListAlexander Krotov1-6/+6
2018-02-12Muse reader: paragraph indentation does not indicate nested quoteAlexander Krotov1-35/+10
Muse allows indentation to indicate quotation or alignment, but only on the top level, not within a <quote> or list. This patch also simplifies the code by removing museInQuote and museInList fields from the state structure. Headers and indented paragraphs are attempted to be parsed only at the topmost level, instead of aborting parsing with guards.
2018-02-12Muse reader: replace optionMaybe with optionalAlexander Krotov1-5/+5
2018-02-11Muse reader: move para definition into blockElementsAlexander Krotov1-4/+1
2018-02-11Muse reader: move end-of-line parsing to paraUntilAlexander Krotov1-3/+3
2018-02-06Muse reader: rename "literal" to "literalTag"Alexander Krotov1-3/+3
2018-02-06Muse reader: avoid reparsing at the top levelAlexander Krotov1-2/+14
Blocks following paragraphs are parsed only once at the top level. Lists still take exponential time to parse, but this time is not doubled anymore when this list terminates paragraph.
2018-02-06Muse reader: implement paraUntilAlexander Krotov1-8/+36
paraUntil does not discard the result of the following block parsing. This change is a part of Muse reader refactoring to avoid reparsing.
2018-02-05Muse reader: avoid parsing newline after paragraph twiceAlexander Krotov1-5/+3
Removed lookAhead from blankline, so it is consumed.
2018-02-05Muse reader: make block parsers responsible for parsing newlineAlexander Krotov1-3/+5
Block parsers must always stop after newline or at the end of file.
2018-02-04Muse reader: simplify listItemContents' with sepBy1Alexander Krotov1-4/+2
2018-02-03C -> c.John MacFarlane1-1/+1
2018-02-03Muse writer: write image width specified in percent in Text::Amuse modeAlexander Krotov1-2/+7
2018-02-02Determine image size for PDFs.John MacFarlane1-1/+22
Closes #4322.
2018-02-01TEI writer: Use height instead of depth for images.John MacFarlane1-1/+1
Closes #4331.
2018-01-31Muse reader: replace ParserState with MuseStateAlexander Krotov1-29/+104
2018-01-31Export list marker parsers from Text.Pandoc.ParsingAlexander Krotov1-0/+5
2018-01-30Muse writer: don't wrap displayMath into <verse>Alexander Krotov1-5/+2
<verse> is a block tag and displayMath is an inline element. Writing <verse> around displayMath could result in nested <verse> tags.
2018-01-29Muse writer: escape nonbreaking space ("~~")Alexander Krotov1-1/+2
2018-01-29Muse reader: simplify block tag parsing codeAlexander Krotov1-21/+12
2018-01-29Muse reader: parse inline <literal> without parseFromStringAlexander Krotov1-2/+1
2018-01-29Muse reader: parse <comment> and <verbatim> without parseFromStringAlexander Krotov1-4/+2
2018-01-28Muse reader: parse verse tag contents without parseFromStringAlexander Krotov1-4/+3
2018-01-28Muse reader: make verseLine return Inlines, not StringAlexander Krotov1-4/+4
2018-01-28Muse reader: parse directives without parseFromStringAlexander Krotov1-7/+5
2018-01-28Muse reader: fix parsing of trailing whitespaceAlexander Krotov1-8/+1
Newline after whitespace now results in softbreak instead of space.
2018-01-28Muse reader: simplify paragraph parsingAlexander Krotov1-3/+2
Blank lines are already handled by blockElements.
2018-01-27Docx writer: make more deterministic to facilitate testingJesse Rosenthal1-10/+16
This will allow us to compare files directly in a golden test. Times are still based on IO, but we will be able to safely skip those. Changes: - `getUniqueId` now calls to the state to get an incremented digit, instead of calling to P.uniqueHash. - we always start the PRNG in mkNumbering/mkAbstractNum with the same seed (1848), so our randoms should be the same each time.
2018-01-27Docx writer: Fix ids in comment writingJesse Rosenthal1-9/+17
Comments from `--track-changes=all` were producing corrupt docx, because the writer was trying to get id from the `(ID,_,_)` field of the attributes, and ignoring the "id" entry in the key-value pairs. We now check both. There is a larger conversation to be had about the right way to treat "id" and "class" entries in kvs, but this fix will correctly interpret the output of the docx reader work.
2018-01-25ConTeXt writer: new section syntax and --section-divs (#4295)Henri Menke1-17/+37
Fixes #2609. This PR introduces the new-style section headings: `\section[my-header]{My Header}` -> `\section[title={My Header},reference={my-header}]`. On top of this, the ConTeXt writer now supports the `--section-divs` option to write sections in the fenced style, with `\startsection` and `\stopsection`.
2018-01-25Dock writer: Fix deletion track changesJesse Rosenthal1-6/+6
This had been mistakenly written as a second insertion function. Closes: #4303
2018-01-24Muse reader: fix matching of closing inline tagsAlexander Krotov1-2/+3
2018-01-24Muse reader: remove `block` functionAlexander Krotov1-7/+4
2018-01-23Lua filters: store constructors in registryAlbert Krewinkel3-3/+29
Lua functions used to construct AST element values are stored in the Lua registry for quicker access. Getting a value from the registry is much faster than getting a global value (partly to idiosyncrasies of hslua); this change results in a considerable performance boost.
2018-01-23Lua: move getTag from StackInstances to UtilAlbert Krewinkel2-13/+17
Change: minor
2018-01-23ConTeXt writer: xtables: correct wrong usage of captionHenri Menke1-1/+1
2018-01-22Muse writer: join code with different attributes during normalizationAlexander Krotov1-2/+2
2018-01-22Muse writer: indent lists inside DivAlexander Krotov1-1/+1
2018-01-21Merge pull request #4237 from sitewisely/header_and_footerJohn MacFarlane1-0/+4
Add header and footer parameters for wkhtmltopdf
2018-01-21Muse reader: embed parseBlocks into parseMuseAlexander Krotov1-8/+2
2018-01-21Muse reader: make listItem genericAlexander Krotov1-3/+3
2018-01-20Markdown reader: Fix parsing bug with nested fenced divs.John MacFarlane1-2/+0
Closes #4281. Previously we allowed "nonindent spaces" before the opening and closing `:::`, but this interfered with list parsing, so now we require the fences to be flush with the margin of the containing block.
2018-01-21Muse reader: simplify paragraph parsingAlexander Krotov1-2/+1
Blanklines are already consumed during block parsing, there is no need to check for them specifically.
2018-01-20RST reader: fix parsing of headers with trailing space.John MacFarlane1-1/+1
This was a regression in pandoc 2.0. Closes #4280.
2018-01-20Docx reader: Use already imported operatorJesse Rosenthal1-1/+1
This fixes an import error in the last commit.