aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc
diff options
context:
space:
mode:
authorAlexander Krotov <ilabdsf@gmail.com>2018-10-21 06:42:00 +0300
committerAlexander Krotov <ilabdsf@gmail.com>2018-10-21 06:42:00 +0300
commit8df59952bf54321a0e24a1e9104324c7ae9c153f (patch)
treea8f1c457d145d01404fe6c877e3e93c4a2d9c446 /src/Text/Pandoc
parentf202279902da34dfa4f22e4e53cb0bf93d519d1e (diff)
downloadpandoc-8df59952bf54321a0e24a1e9104324c7ae9c153f.tar.gz
Muse reader: allow empty headers
Previously empty headers caused parser to terminate without parsing the rest of the document.
Diffstat (limited to 'src/Text/Pandoc')
-rw-r--r--src/Text/Pandoc/Readers/Muse.hs8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/Text/Pandoc/Readers/Muse.hs b/src/Text/Pandoc/Readers/Muse.hs
index 3b64fe5ef..b973486b1 100644
--- a/src/Text/Pandoc/Readers/Muse.hs
+++ b/src/Text/Pandoc/Readers/Muse.hs
@@ -172,12 +172,6 @@ getIndent :: PandocMonad m
=> MuseParser m Int
getIndent = subtract 1 . sourceColumn <$ many spaceChar <*> getPosition
-someUntil :: (Stream s m t)
- => ParserT s u m a
- -> ParserT s u m b
- -> ParserT s u m ([a], b)
-someUntil p end = first <$> ((:) <$> p) <*> manyUntil p end
-
-- ** HTML parsers
openTag :: PandocMonad m => String -> MuseParser m [(String, String)]
@@ -462,7 +456,7 @@ paraContentsUntil :: PandocMonad m
=> MuseParser m a -- ^ Terminator parser
-> MuseParser m (F Inlines, a)
paraContentsUntil end = first (trimInlinesF . mconcat)
- <$> someUntil inline (try (manyTill spaceChar eol *> local (\s -> s { museInPara = True}) end))
+ <$> manyUntil inline (try (manyTill spaceChar eol *> local (\s -> s { museInPara = True}) end))
-- | Parse a paragraph.
paraUntil :: PandocMonad m