From ebbd441d062f71c9a347704730f5ea3247527045 Mon Sep 17 00:00:00 2001 From: Alexander Krotov Date: Sat, 7 Apr 2018 18:31:06 +0300 Subject: Muse reader: add support for and tags --- src/Text/Pandoc/Readers/Muse.hs | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/Text/Pandoc/Readers/Muse.hs b/src/Text/Pandoc/Readers/Muse.hs index b125ccd6a..00ae85674 100644 --- a/src/Text/Pandoc/Readers/Muse.hs +++ b/src/Text/Pandoc/Readers/Muse.hs @@ -36,8 +36,7 @@ TODO: - Org tables - table.el tables - Images with attributes (floating and width) -- Citations and -- environment +- tag -} module Text.Pandoc.Readers.Muse (readMuse) where @@ -322,6 +321,8 @@ blockElements = do , rightTag , quoteTag , divTag + , biblioTag + , playTag , verseTag , lineBlock , table @@ -413,6 +414,18 @@ divTag = do (attrs, content) <- parseHtmlContent "div" return $ B.divWith attrs <$> content +-- tag is supported by Amusewiki only +biblioTag :: PandocMonad m => MuseParser m (F Blocks) +biblioTag = do + guardEnabled Ext_amuse + fmap (B.divWith ("", ["biblio"], [])) . snd <$> parseHtmlContent "biblio" + +-- tag is supported by Amusewiki only +playTag :: PandocMonad m => MuseParser m (F Blocks) +playTag = do + guardEnabled Ext_amuse + fmap (B.divWith ("", ["play"], [])) . snd <$> parseHtmlContent "play" + verseLine :: PandocMonad m => MuseParser m (F Inlines) verseLine = do indent <- (B.str <$> many1 (char ' ' >> pure '\160')) <|> pure mempty -- cgit v1.2.3