From 02cb6eb47794d6af650b2d504400c61eccc8d18c Mon Sep 17 00:00:00 2001 From: Alexander Krotov Date: Sun, 11 Feb 2018 19:30:01 +0300 Subject: Muse reader: move end-of-line parsing to paraUntil --- src/Text/Pandoc/Readers/Muse.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/Text') diff --git a/src/Text/Pandoc/Readers/Muse.hs b/src/Text/Pandoc/Readers/Muse.hs index 2ea4b1dd5..00123120d 100644 --- a/src/Text/Pandoc/Readers/Muse.hs +++ b/src/Text/Pandoc/Readers/Muse.hs @@ -259,7 +259,7 @@ parseBlocks = blockStart = do first <- blockElements rest <- parseBlocks return $ first B.<> rest - paraStart = do (first, rest) <- paraUntil ((mempty <$ eof) <|> (blankline >> blockStart)) + paraStart = do (first, rest) <- paraUntil ((mempty <$ eof) <|> blockStart) return $ first B.<> rest parseBlock :: PandocMonad m => MuseParser m (F Blocks) @@ -410,13 +410,13 @@ paraUntil end = do indent <- length <$> many spaceChar st <- museInList <$> getState let f = if not st && indent >= 2 && indent < 6 then B.blockQuote else id - (l, e) <- someUntil inline $ try end + (l, e) <- someUntil inline $ try (manyTill spaceChar eol >> end) let p = fmap (f . B.para) $ trimInlinesF $ mconcat l return (p, e) para :: PandocMonad m => MuseParser m (F Blocks) para = - fst <$> paraUntil (try (eof <|> (blankline >> void (lookAhead blockElements)))) + fst <$> paraUntil (try (eof <|> void (lookAhead blockElements))) noteMarker :: PandocMonad m => MuseParser m String noteMarker = try $ do -- cgit v1.2.3