diff options
-rw-r--r-- | src/Text/Pandoc/Readers/Muse.hs | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/Text/Pandoc/Readers/Muse.hs b/src/Text/Pandoc/Readers/Muse.hs index ee93c6777..6cb732c42 100644 --- a/src/Text/Pandoc/Readers/Muse.hs +++ b/src/Text/Pandoc/Readers/Muse.hs @@ -378,13 +378,11 @@ separator = try $ pure B.horizontalRule <* eol headingStart :: PandocMonad m => MuseParser m (String, Int) -headingStart = try $ do - anchorId <- option "" $ try (parseAnchor <* manyTill spaceChar eol) - firstColumn - level <- fmap length $ many1 $ char '*' - guard $ level <= 5 - spaceChar - return (anchorId, level) +headingStart = try $ (,) + <$> option "" (try (parseAnchor <* manyTill spaceChar eol)) + <* firstColumn + <*> fmap length (many1 $ char '*') + <* spaceChar -- | Parse a single-line heading. emacsHeading :: PandocMonad m => MuseParser m (F Blocks) |