diff options
Diffstat (limited to 'src/Text')
-rw-r--r-- | src/Text/Pandoc/SelfContained.hs | 7 |
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 |