diff options
author | Alexander <ilabdsf@gmail.com> | 2017-09-05 07:22:40 +0300 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2017-09-04 21:22:40 -0700 |
commit | c09b586147d607f645a639a47c7781e8d8655e20 (patch) | |
tree | d38d3fe7b7f77633f5e83f513b26b4263da1e03e /src | |
parent | 2637df2bdfdffe55dc7363feac188d9144f18fea (diff) |
Muse reader: parse <div> tag (#3888)
Diffstat (limited to 'src')
-rw-r--r-- | src/Text/Pandoc/Readers/Muse.hs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/Text/Pandoc/Readers/Muse.hs b/src/Text/Pandoc/Readers/Muse.hs index a4512cdd7..1951a47af 100644 --- a/src/Text/Pandoc/Readers/Muse.hs +++ b/src/Text/Pandoc/Readers/Muse.hs @@ -179,6 +179,7 @@ blockElements = choice [ comment , centerTag , rightTag , quoteTag + , divTag , verseTag , lineBlock , bulletList @@ -245,6 +246,12 @@ rightTag = blockTag id "right" quoteTag :: PandocMonad m => MuseParser m (F Blocks) 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 + return $ (B.divWith attrs) <$> mconcat content + verseLine :: PandocMonad m => MuseParser m String verseLine = do line <- anyLine <|> many1Till anyChar eof |