diff --git a/src/Text/Pandoc/SelfContained.hs b/src/Text/Pandoc/SelfContained.hs index 617cdfc33908..25b9a960979d 100644 --- a/src/Text/Pandoc/SelfContained.hs +++ b/src/Text/Pandoc/SelfContained.hs @@ -127,7 +127,8 @@ convertTags (t@(TagOpen "link" as):ts) = (("href",dataUri) : [(x,y) | (x,y) <- as, x /= "href"]) : rest Fetched (mime, bs) - | "text/css" `T.isPrefixOf` mime + | ("text/css" `T.isPrefixOf` mime || + fromAttrib "rel" t == "stylesheet") && T.null (fromAttrib "media" t) && not (" do rest <- convertTags $