From 52e372b71d8ac5168025ad7ec2e9623c74c2dd93 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Wed, 1 Nov 2017 17:42:33 -0700 Subject: SelfContained: use base64 for css links with media attribute. This fixes `--self-contained` with s5. Closes #4026. --- src/Text/Pandoc/SelfContained.hs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Text/Pandoc/SelfContained.hs b/src/Text/Pandoc/SelfContained.hs index d3b768109..7cdd6f6e1 100644 --- a/src/Text/Pandoc/SelfContained.hs +++ b/src/Text/Pandoc/SelfContained.hs @@ -124,6 +124,7 @@ convertTags (t@(TagOpen "link" as):ts) = rest Right (mime, bs) | "text/css" `isPrefixOf` mime + && null (fromAttrib "media" t) && not (" do rest <- convertTags $ dropWhile (==TagClose "link") ts -- cgit v1.2.3