diff options
author | Alexander Krotov <ilabdsf@gmail.com> | 2017-06-26 09:40:53 +0300 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2017-06-26 08:40:53 +0200 |
commit | b95f391bebdd6d79b11db4469d97640e80285ccc (patch) | |
tree | 4e37cc5a3b9d78ff2a2f2f2fa905299e2f7ea684 | |
parent | 4cbbc9dd587d73d576b4c891f3f37a19f12cf10c (diff) | |
download | pandoc-b95f391bebdd6d79b11db4469d97640e80285ccc.tar.gz |
Muse reader: simplify para implementation (#3761)
-rw-r--r-- | src/Text/Pandoc/Readers/Muse.hs | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/Text/Pandoc/Readers/Muse.hs b/src/Text/Pandoc/Readers/Muse.hs index fe8a55f5c..06d385222 100644 --- a/src/Text/Pandoc/Readers/Muse.hs +++ b/src/Text/Pandoc/Readers/Muse.hs @@ -247,9 +247,7 @@ commentTag :: PandocMonad m => MuseParser m (F Blocks) commentTag = parseHtmlContent "comment" block >> return mempty para :: PandocMonad m => MuseParser m (F Blocks) -para = do - res <- trimInlinesF . mconcat <$> many1Till inline endOfParaElement - return $ B.para <$> res +para = liftM B.para . trimInlinesF . mconcat <$> many1Till inline endOfParaElement where endOfParaElement = lookAhead $ endOfInput <|> endOfPara <|> newBlockElement endOfInput = try $ skipMany blankline >> skipSpaces >> eof |