aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2017-11-01 17:42:33 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2017-11-01 17:42:33 -0700
commit52e372b71d8ac5168025ad7ec2e9623c74c2dd93 (patch)
treeeb81529bdbfe4d72d908699b92bcfd3a8f5b5d71 /src
parented3d46638425825de30aaa3d1152b9343292c315 (diff)
downloadpandoc-52e372b71d8ac5168025ad7ec2e9623c74c2dd93.tar.gz
SelfContained: use base64 for css links with media attribute.
This fixes `--self-contained` with s5. Closes #4026.
Diffstat (limited to 'src')
-rw-r--r--src/Text/Pandoc/SelfContained.hs1
1 files changed, 1 insertions, 0 deletions
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 ("</" `B.isInfixOf` bs) -> do
rest <- convertTags $
dropWhile (==TagClose "link") ts