From 42d2f005b3430bd25460f6165911f05e9c30eb65 Mon Sep 17 00:00:00 2001 From: Mario Botsch Date: Sun, 8 Apr 2018 22:02:32 +0200 Subject: [PATCH] add back missing attributes to img, add muted flag for videos --- src/Text/Pandoc/Util/Filter.hs | 1 + src/Text/Pandoc/Util/Filter/Media.hs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Text/Pandoc/Util/Filter.hs b/src/Text/Pandoc/Util/Filter.hs index df1af55..ff1c824 100644 --- a/src/Text/Pandoc/Util/Filter.hs +++ b/src/Text/Pandoc/Util/Filter.hs @@ -81,6 +81,7 @@ revealjsSpecialAttrs = , "data-ignore" , "controls" , "loop" + , "muted" ] -- | revealjs has some special attributes that has to be diff --git a/src/Text/Pandoc/Util/Filter/Media.hs b/src/Text/Pandoc/Util/Filter/Media.hs index b7c95fa..d58eacf 100644 --- a/src/Text/Pandoc/Util/Filter/Media.hs +++ b/src/Text/Pandoc/Util/Filter/Media.hs @@ -131,7 +131,7 @@ media (Image (id', att, att') alt (filename,_)) --images media (Image (id', att, att') [] (filename,_)) | id' == "img" || checkExtension filename imgExt - = return $ [toHtml $ " unwords direct <> " src=\"" <> filename <> "\" style=\"" <> style <> "\">"] + = return $ [toHtml $ " attToString (idFilter "img" id',css,att') <> unwords direct <> " src=\"" <> filename <> "\" style=\"" <> style <> "\">"] where (direct, css) = (classToRevealAttr . revealjsRewriteAttr) att style = filterStyle att'