diff options
author | Alexander Krotov <ilabdsf@gmail.com> | 2018-01-21 03:06:58 +0300 |
---|---|---|
committer | Alexander Krotov <ilabdsf@gmail.com> | 2018-01-21 03:26:54 +0300 |
commit | 91bca732666d8825702c4986d0dfd5a6d3fee3bb (patch) | |
tree | 867b7ce85f061d819187031148e1afd1a9ed8f54 /src | |
parent | eaebc5fd19ac7f035805ddfec90ebeca17cd6561 (diff) | |
download | pandoc-91bca732666d8825702c4986d0dfd5a6d3fee3bb.tar.gz |
Muse reader: embed parseBlocks into parseMuse
Diffstat (limited to 'src')
-rw-r--r-- | src/Text/Pandoc/Readers/Muse.hs | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/Text/Pandoc/Readers/Muse.hs b/src/Text/Pandoc/Readers/Muse.hs index daebe81aa..8f36db9d1 100644 --- a/src/Text/Pandoc/Readers/Muse.hs +++ b/src/Text/Pandoc/Readers/Muse.hs @@ -79,7 +79,8 @@ type MuseParser = ParserT String ParserState parseMuse :: PandocMonad m => MuseParser m Pandoc parseMuse = do many directive - blocks <- parseBlocks + blocks <- mconcat <$> many block + eof st <- getState let doc = runF (do Pandoc _ bs <- B.doc <$> blocks meta <- stateMeta' st @@ -87,13 +88,6 @@ parseMuse = do reportLogMessages return doc -parseBlocks :: PandocMonad m => MuseParser m (F Blocks) -parseBlocks = do - res <- mconcat <$> many block - spaces - eof - return res - -- -- utility functions -- |