git.iko.soy/typeable/pandoc
on master help sign in
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...

commitc2de9d749cbc21386e153a4f9efc3049a299cecc authorJohn MacFarlane <jgm@berkeley.edu> dateMon 16 Oct 2017, 23:10 (9 years ago) parent514958f
1 file changed+3−2
src/Text/Pandoc/SelfContained.hs+3−2
src/Text/Pandoc/SelfContained.hs+3−2
@@ -74,12 +74,13 @@ convertTags (t@TagOpen{}:ts)
7474 | fromAttrib "data-external" t == "1" = (t:) <$> convertTags ts
7575convertTags (t@(TagOpen tagname as):ts)
7676 | tagname `elem`
77− ["img", "embed", "video", "input", "audio", "source", "track"] = do
77+ ["img", "embed", "video", "input", "audio", "source", "track",
78+ "section"] = do
7879 as' <- mapM processAttribute as
7980 rest <- convertTags ts
8081 return $ TagOpen tagname as' : rest
8182 where processAttribute (x,y) =
82− if x == "src" || x == "data-src" || x == "href" || x == "poster"
83+ if x `elem` ["src", "data-src", "href", "poster", "data-background"]
8384 then do
8485 enc <- getDataURI (fromAttrib "type" t) y
8586 return (x, enc)