git.iko.soy/typeable/pandoc
on master help sign in
Merge pull request #3913 from labdsf/muse-reader-verbatim
7df095fJohn MacFarlane
src/Text/Pandoc/Readers/Muse.hs+6−1
@@ -39,7 +39,6 @@ TODO:
39- Anchors
39- Anchors
40- Citations and <biblio>
40- Citations and <biblio>
41- <play> environment
41- <play> environment
42−- <verbatim> tag
43-}
42-}
44module Text.Pandoc.Readers.Muse (readMuse) where
43module Text.Pandoc.Readers.Muse (readMuse) where
45
44
@@ -537,6 +536,7 @@ inline = choice [ br
537 , superscriptTag
536 , superscriptTag
538 , subscriptTag
537 , subscriptTag
539 , strikeoutTag
538 , strikeoutTag
539+ , verbatimTag
540 , link
540 , link
541 , code
541 , code
542 , codeTag
542 , codeTag
@@ -613,6 +613,11 @@ subscriptTag = inlineTag B.subscript "sub"
613strikeoutTag :: PandocMonad m => MuseParser m (F Inlines)
613strikeoutTag :: PandocMonad m => MuseParser m (F Inlines)
614strikeoutTag = inlineTag B.strikeout "del"
614strikeoutTag = inlineTag B.strikeout "del"
615
615
616+verbatimTag :: PandocMonad m => MuseParser m (F Inlines)
617+verbatimTag = do
618+ content <- parseHtmlContent "verbatim" anyChar
619+ return $ return $ B.text $ fromEntities content
620+
616code :: PandocMonad m => MuseParser m (F Inlines)
621code :: PandocMonad m => MuseParser m (F Inlines)
617code = try $ do
622code = try $ do
618 pos <- getPosition
623 pos <- getPosition
test/Tests/Readers/Muse.hs+2
@@ -108,6 +108,8 @@ tests =
108
108
109 , "Code tag" =: "<code>foo(bar)</code>" =?> para (code "foo(bar)")
109 , "Code tag" =: "<code>foo(bar)</code>" =?> para (code "foo(bar)")
110
110
111+ , "Verbatim tag" =: "*<verbatim>*</verbatim>*" =?> para (emph "*")
112+
111 , testGroup "Links"
113 , testGroup "Links"
112 [ "Link without description" =:
114 [ "Link without description" =:
113 "[[https://amusewiki.org/]]" =?>
115 "[[https://amusewiki.org/]]" =?>