From 763126dae07e29435dc8b3cc1f7f20cfff823fe0 Mon Sep 17 00:00:00 2001 From: Alexander Krotov Date: Wed, 24 Jan 2018 13:58:43 +0300 Subject: Muse reader: remove `block` function --- src/Text/Pandoc/Readers/Muse.hs | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/Text/Pandoc/Readers/Muse.hs b/src/Text/Pandoc/Readers/Muse.hs index 8f36db9d1..a9c0162d2 100644 --- a/src/Text/Pandoc/Readers/Muse.hs +++ b/src/Text/Pandoc/Readers/Muse.hs @@ -79,7 +79,7 @@ type MuseParser = ParserT String ParserState parseMuse :: PandocMonad m => MuseParser m Pandoc parseMuse = do many directive - blocks <- mconcat <$> many block + blocks <- mconcat <$> many parseBlock eof st <- getState let doc = runF (do Pandoc _ bs <- B.doc <$> blocks @@ -187,9 +187,6 @@ parseBlock = do trace (take 60 $ show $ B.toList $ runF res defaultParserState) return res -block :: PandocMonad m => MuseParser m (F Blocks) -block = parseBlock <* skipMany blankline - blockElements :: PandocMonad m => MuseParser m (F Blocks) blockElements = choice [ mempty <$ blankline , comment @@ -287,7 +284,7 @@ blockTag :: PandocMonad m -> String -> MuseParser m (F Blocks) blockTag f s = do - res <- parseHtmlContent s block + res <- parseHtmlContent s parseBlock return $ f <$> mconcat res --
tag is ignored @@ -304,7 +301,7 @@ quoteTag = withQuoteContext InDoubleQuote $ blockTag B.blockQuote "quote" --
tag is supported by Emacs Muse, but not Amusewiki 2.025 divTag :: PandocMonad m => MuseParser m (F Blocks) divTag = do - (attrs, content) <- parseHtmlContentWithAttrs "div" block + (attrs, content) <- parseHtmlContentWithAttrs "div" parseBlock return $ B.divWith attrs <$> mconcat content verseLine :: PandocMonad m => MuseParser m String @@ -377,7 +374,7 @@ emacsNoteBlock = try $ do return mempty where blocksTillNote = - many1Till block (eof <|> () <$ lookAhead noteMarker) + many1Till parseBlock (eof <|> () <$ lookAhead noteMarker) -- -- Verse markup -- cgit v1.2.3