diff options
author | Alexander Krotov <ilabdsf@gmail.com> | 2018-01-24 13:58:43 +0300 |
---|---|---|
committer | Alexander Krotov <ilabdsf@gmail.com> | 2018-01-24 13:58:43 +0300 |
commit | 763126dae07e29435dc8b3cc1f7f20cfff823fe0 (patch) | |
tree | 36ac34d79481e9da13ec1bb6b1cee2ec6490cddd /src/Text | |
parent | 517f65a7cc3e94b9c4ad574369a32c48e0a95be6 (diff) | |
download | pandoc-763126dae07e29435dc8b3cc1f7f20cfff823fe0.tar.gz |
Muse reader: remove `block` function
Diffstat (limited to 'src/Text')
-rw-r--r-- | src/Text/Pandoc/Readers/Muse.hs | 11 |
1 files changed, 4 insertions, 7 deletions
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 -- <center> tag is ignored @@ -304,7 +301,7 @@ quoteTag = withQuoteContext InDoubleQuote $ blockTag B.blockQuote "quote" -- <div> 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 |