Muse reader: parse inline <literal> without parseFromString

This commit is contained in:
Alexander Krotov 2018-01-28 23:39:31 +03:00
parent 60b2863e90
commit ff31602267

View file

@ -704,8 +704,7 @@ codeTag = do
inlineLiteralTag :: PandocMonad m => MuseParser m (F Inlines) inlineLiteralTag :: PandocMonad m => MuseParser m (F Inlines)
inlineLiteralTag = do inlineLiteralTag = do
guardDisabled Ext_amuse -- Text::Amuse does not support <literal> guardDisabled Ext_amuse -- Text::Amuse does not support <literal>
(attrs, content) <- parseHtmlContentWithAttrs "literal" anyChar (return . rawInline) <$> htmlElement "literal"
return $ return $ rawInline (attrs, content)
where where
-- FIXME: Emacs Muse inserts <literal> without style into all output formats, but we assume HTML -- FIXME: Emacs Muse inserts <literal> without style into all output formats, but we assume HTML
format (_, _, kvs) = fromMaybe "html" $ lookup "style" kvs format (_, _, kvs) = fromMaybe "html" $ lookup "style" kvs