aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc
diff options
context:
space:
mode:
authorJohn MacFarlane <fiddlosopher@gmail.com>2011-11-24 10:04:25 -0800
committerJohn MacFarlane <fiddlosopher@gmail.com>2011-11-24 10:04:25 -0800
commitf027fd0eff899146dd8b69e3e5a6565ca1c4da0b (patch)
tree67a38d9a13153e9462e4fe6b4f5fec2ed23fc4a6 /src/Text/Pandoc
parent41eded5dd2bbf7595281520d590463d71f191635 (diff)
downloadpandoc-f027fd0eff899146dd8b69e3e5a6565ca1c4da0b.tar.gz
--self-contained now works with `<video>` as well as `<img>`.
Diffstat (limited to 'src/Text/Pandoc')
-rw-r--r--src/Text/Pandoc/SelfContained.hs7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/Text/Pandoc/SelfContained.hs b/src/Text/Pandoc/SelfContained.hs
index 116083fba..1bc081e0e 100644
--- a/src/Text/Pandoc/SelfContained.hs
+++ b/src/Text/Pandoc/SelfContained.hs
@@ -209,6 +209,13 @@ convertTag userdata t@(TagOpen "img" as) =
(raw, mime) <- getRaw userdata t src
let enc = "data:" ++ mime ++ ";base64," ++ toString (encode raw)
return $ TagOpen "img" (("src",enc) : [(x,y) | (x,y) <- as, x /= "src"])
+convertTag userdata t@(TagOpen "video" as) =
+ case fromAttrib "src" t of
+ [] -> return t
+ src -> do
+ (raw, mime) <- getRaw userdata t src
+ let enc = "data:" ++ mime ++ ";base64," ++ toString (encode raw)
+ return $ TagOpen "video" (("src",enc) : [(x,y) | (x,y) <- as, x /= "src"])
convertTag userdata t@(TagOpen "script" as) =
case fromAttrib "src" t of
[] -> return t