add back missing attributes to img, add muted flag for videos

This commit is contained in:
Mario Botsch 2018-04-08 22:02:32 +02:00
parent 5c7bfe8ac9
commit 42d2f005b3
2 changed files with 2 additions and 1 deletions

View File

@ -81,6 +81,7 @@ revealjsSpecialAttrs =
, "data-ignore"
, "controls"
, "loop"
, "muted"
]
-- | revealjs has some special attributes that has to be

View File

@ -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 $ "<img " <> unwords direct <> " src=\"" <> filename <> "\" style=\"" <> style <> "\"></img>"]
= return $ [toHtml $ "<img " <> attToString (idFilter "img" id',css,att') <> unwords direct <> " src=\"" <> filename <> "\" style=\"" <> style <> "\"></img>"]
where
(direct, css) = (classToRevealAttr . revealjsRewriteAttr) att
style = filterStyle att'