From c74d2064a7cf40b4c03b1b047a03d24a5fd31645 Mon Sep 17 00:00:00 2001
From: Alexander Krotov <ilabdsf@gmail.com>
Date: Mon, 5 Feb 2018 02:57:03 +0300
Subject: Muse reader: avoid parsing newline after paragraph twice

Removed lookAhead from blankline, so it is consumed.
---
 src/Text/Pandoc/Readers/Muse.hs | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

(limited to 'src')

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
-- 
cgit v1.2.3