aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlexander Krotov <ilabdsf@gmail.com>2018-02-11 19:30:01 +0300
committerAlexander Krotov <ilabdsf@gmail.com>2018-02-11 19:30:01 +0300
commit02cb6eb47794d6af650b2d504400c61eccc8d18c (patch)
treea4bc2f1ee4854cb40891eafb34777b23cb2973f1 /src
parent018d8aaee8be3caa64162eab8283f6ae463b9ec6 (diff)
downloadpandoc-02cb6eb47794d6af650b2d504400c61eccc8d18c.tar.gz
Muse reader: move end-of-line parsing to paraUntil
Diffstat (limited to 'src')
-rw-r--r--src/Text/Pandoc/Readers/Muse.hs6
1 files changed, 3 insertions, 3 deletions
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