Merge pull request #3913 from labdsf/muse-reader-verbatim
Muse reader: parse verbatim tag
This commit is contained in:
commit
7df095f049
2 changed files with 8 additions and 1 deletions
|
@ -39,7 +39,6 @@ TODO:
|
||||||
- Anchors
|
- Anchors
|
||||||
- Citations and <biblio>
|
- Citations and <biblio>
|
||||||
- <play> environment
|
- <play> environment
|
||||||
- <verbatim> tag
|
|
||||||
-}
|
-}
|
||||||
module Text.Pandoc.Readers.Muse (readMuse) where
|
module Text.Pandoc.Readers.Muse (readMuse) where
|
||||||
|
|
||||||
|
@ -537,6 +536,7 @@ inline = choice [ br
|
||||||
, superscriptTag
|
, superscriptTag
|
||||||
, subscriptTag
|
, subscriptTag
|
||||||
, strikeoutTag
|
, strikeoutTag
|
||||||
|
, verbatimTag
|
||||||
, link
|
, link
|
||||||
, code
|
, code
|
||||||
, codeTag
|
, codeTag
|
||||||
|
@ -613,6 +613,11 @@ subscriptTag = inlineTag B.subscript "sub"
|
||||||
strikeoutTag :: PandocMonad m => MuseParser m (F Inlines)
|
strikeoutTag :: PandocMonad m => MuseParser m (F Inlines)
|
||||||
strikeoutTag = inlineTag B.strikeout "del"
|
strikeoutTag = inlineTag B.strikeout "del"
|
||||||
|
|
||||||
|
verbatimTag :: PandocMonad m => MuseParser m (F Inlines)
|
||||||
|
verbatimTag = do
|
||||||
|
content <- parseHtmlContent "verbatim" anyChar
|
||||||
|
return $ return $ B.text $ fromEntities content
|
||||||
|
|
||||||
code :: PandocMonad m => MuseParser m (F Inlines)
|
code :: PandocMonad m => MuseParser m (F Inlines)
|
||||||
code = try $ do
|
code = try $ do
|
||||||
pos <- getPosition
|
pos <- getPosition
|
||||||
|
|
|
@ -108,6 +108,8 @@ tests =
|
||||||
|
|
||||||
, "Code tag" =: "<code>foo(bar)</code>" =?> para (code "foo(bar)")
|
, "Code tag" =: "<code>foo(bar)</code>" =?> para (code "foo(bar)")
|
||||||
|
|
||||||
|
, "Verbatim tag" =: "*<verbatim>*</verbatim>*" =?> para (emph "*")
|
||||||
|
|
||||||
, testGroup "Links"
|
, testGroup "Links"
|
||||||
[ "Link without description" =:
|
[ "Link without description" =:
|
||||||
"[[https://amusewiki.org/]]" =?>
|
"[[https://amusewiki.org/]]" =?>
|
||||||
|
|
Loading…
Add table
Reference in a new issue