diff options
author | Alexander Krotov <ilabdsf@gmail.com> | 2018-02-05 02:57:03 +0300 |
---|---|---|
committer | Alexander Krotov <ilabdsf@gmail.com> | 2018-02-05 02:57:03 +0300 |
commit | c74d2064a7cf40b4c03b1b047a03d24a5fd31645 (patch) | |
tree | 5ce9be91069b34952a44815c2ee6d16089b82c85 /src/Text/Pandoc/Readers | |
parent | 1a06f0ecfb5a4898daf2769f4c072fa12bae6d39 (diff) | |
download | pandoc-c74d2064a7cf40b4c03b1b047a03d24a5fd31645.tar.gz |
Muse reader: avoid parsing newline after paragraph twice
Removed lookAhead from blankline, so it is consumed.
Diffstat (limited to 'src/Text/Pandoc/Readers')
-rw-r--r-- | src/Text/Pandoc/Readers/Muse.hs | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/Text/Pandoc/Readers/Muse.hs b/src/Text/Pandoc/Readers/Muse.hs index 63dcac122..4f4300a63 100644 --- a/src/Text/Pandoc/Readers/Muse.hs +++ b/src/Text/Pandoc/Readers/Muse.hs @@ -373,12 +373,10 @@ para = do indent <- length <$> many spaceChar st <- museInList <$> getState let f = if not st && indent >= 2 && indent < 6 then B.blockQuote else id - res <- fmap (f . B.para) . trimInlinesF . mconcat <$> many1Till inline endOfParaElement - manyTill spaceChar eol - return res + fmap (f . B.para) . trimInlinesF . mconcat <$> many1Till inline endOfParaElement where - endOfParaElement = lookAhead $ try (eof <|> newBlockElement) - newBlockElement = blankline >> void blockElements + endOfParaElement = try (eof <|> newBlockElement) + newBlockElement = blankline >> void (lookAhead blockElements) noteMarker :: PandocMonad m => MuseParser m String noteMarker = try $ do |