From c2de9d749cbc21386e153a4f9efc3049a299cecc Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Mon, 16 Oct 2017 23:10:05 -0700 Subject: SelfContained: handle data-background attribute on section. This should help with #3979. In my test, I got a data uri for data-background. But it didn't actually work in the browser (the background image didn't show). Not sure whether this is a problem in reveal.js or a problem in pandoc... --- src/Text/Pandoc/SelfContained.hs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/Text') diff --git a/src/Text/Pandoc/SelfContained.hs b/src/Text/Pandoc/SelfContained.hs index 9ab7be6b9..36be62f0a 100644 --- a/src/Text/Pandoc/SelfContained.hs +++ b/src/Text/Pandoc/SelfContained.hs @@ -74,12 +74,13 @@ convertTags (t@TagOpen{}:ts) | fromAttrib "data-external" t == "1" = (t:) <$> convertTags ts convertTags (t@(TagOpen tagname as):ts) | tagname `elem` - ["img", "embed", "video", "input", "audio", "source", "track"] = do + ["img", "embed", "video", "input", "audio", "source", "track", + "section"] = do as' <- mapM processAttribute as rest <- convertTags ts return $ TagOpen tagname as' : rest where processAttribute (x,y) = - if x == "src" || x == "data-src" || x == "href" || x == "poster" + if x `elem` ["src", "data-src", "href", "poster", "data-background"] then do enc <- getDataURI (fromAttrib "type" t) y return (x, enc) -- cgit v1.2.3