aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Readers/Muse.hs
AgeCommit message (Collapse)AuthorFilesLines
2018-02-21Muse reader: replace setState with updateState where possibleAlexander Krotov1-18/+9
2018-02-20Muse reader: fix compiler warningJesse Rosenthal1-1/+1
lambda variable `st` shadowed an existing variable.
2018-02-20Muse reader: use updateState instead of setState to restore museInLinkAlexander Krotov1-1/+1
2018-02-19Move manyUntil to Text.Pandoc.Parsing and use it in Txt2Tags readerAlexander Krotov1-14/+0
2018-02-16Muse reader: prioritize lists with roman numerals over alphabetical listsAlexander Krotov1-1/+1
This is to make sure "i." starts a roman numbered list, instead of a list with letter "i" (followed by "j", "k", ...").
2018-02-15Muse reader: fix directive parsingAlexander Krotov1-3/+1
This fixes bugs introduced in commit 4bfab8f04c105f111d8d4e1c3ed7f7b5c75dbd19.
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-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 "~~"