aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Text/Pandoc/Readers/HTML.hs9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/Text/Pandoc/Readers/HTML.hs b/src/Text/Pandoc/Readers/HTML.hs
index a9a04c962..b6f88d3a9 100644
--- a/src/Text/Pandoc/Readers/HTML.hs
+++ b/src/Text/Pandoc/Readers/HTML.hs
@@ -652,6 +652,7 @@ inline = choice
, pLink
, pImage
, pCode
+ , pSamp
, pSpan
, pMath False
, pScriptMath
@@ -781,6 +782,14 @@ pImage = do
let kvs = concatMap getAtt ["width", "height", "sizes", "srcset"]
return $ B.imageWith (uid, cls, kvs) (escapeURI url) title (B.text alt)
+pSamp :: PandocMonad m => TagParser m Inlines
+pSamp = try $ do
+ TagOpen open attr' <- pSatisfy $ tagOpen (=="samp") (const True)
+ result <- manyTill pAny (pCloses open)
+ let (ids,cs,kvs) = mkAttr . toStringAttr $ attr'
+ return . B.codeWith (ids,"sample":cs,kvs) .
+ unwords . lines . T.unpack . innerText $ result
+
pCode :: PandocMonad m => TagParser m Inlines
pCode = try $ do
(TagOpen open attr') <- pSatisfy $ tagOpen (`elem` ["code","tt"]) (const True)