aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Readers/Muse.hs
AgeCommit message (Collapse)AuthorFilesLines
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-01-31Muse reader: replace ParserState with MuseStateAlexander Krotov1-29/+104
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-24Muse reader: fix matching of closing inline tagsAlexander Krotov1-2/+3
2018-01-24Muse reader: remove `block` functionAlexander Krotov1-7/+4
2018-01-21Muse reader: embed parseBlocks into parseMuseAlexander Krotov1-8/+2
2018-01-21Muse reader: make listItem genericAlexander Krotov1-3/+3
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-19hlint code improvements.John MacFarlane1-1/+1
2018-01-20Muse reader: fix parsing of nested definition listsAlexander Krotov1-11/+10
2018-01-19Muse reader: remove duplicate variable in definitionListItemAlexander Krotov1-2/+1
2018-01-19Muse reader: require only one space for nested definition list indentationAlexander Krotov1-1/+2
2018-01-19Muse reader: parse verse without parseFromStringAlexander Krotov1-10/+12
2018-01-19Muse reader: remove commented out codeAlexander Krotov1-1/+0
2018-01-19Muse reader: parse Emacs Muse directives without parseFromStringAlexander Krotov1-4/+2
Also require space (not newline) after directive name.
2018-01-19Muse reader: parse link text without parseFromStringAlexander Krotov1-2/+1
2018-01-19Muse reader: simplify tableParseCaptionAlexander Krotov1-3/+1
2018-01-19Muse reader: parse definition list terms without parseFromStringAlexander Krotov1-17/+13
2018-01-19Muse reader: do not remove trailing whitespace from <code>Alexander Krotov1-1/+1
2018-01-18Muse reader: fix parsing of code at the beginning of paragraphAlexander Krotov1-6/+2
2018-01-18Muse reader: refactor definition list parsingAlexander Krotov1-17/+15
Test with wrong indentation is removed, because now it is parsed as nested lists. Emacs Muse and Text::Amuse don't have the same behavior anyway.
2018-01-18Muse reader: parse "~~" as non-breaking space in Text::Amuse modeAlexander Krotov1-2/+1
Latest Text::Amuse supports "~~"
2018-01-18Muse reader: refactor list parsingAlexander Krotov1-75/+65
Now list item contents is parsed as blocks, without resorting to parseFromString. Only the first line of paragraph has to be indented now, just like in Emacs Muse and Text::Amuse. Definition lists are not refactored yet. See also: issue #3865.
2018-01-18Muse reader: code cleanupAlexander Krotov1-2/+2
2018-01-05Update copyright notices to include 2018Albert Krewinkel1-2/+2
2017-12-31Muse reader: automatically translate #cover into #cover-imageAlexander Krotov1-1/+3
Amusewiki uses #cover directive to specify cover image.
2017-12-21Muse reader: parse anchors immediately after headings as IDsAlexander Krotov1-5/+9
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-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