@@ -1059,11 +1059,17 @@ getMediaNextNewName ext = do
10591059 let nextName = "file" ++ show nextId ++ ext
10601060 (P.fetchItem (TS.pack nextName) >> getMediaNextNewName ext) `catchError` const (return nextName)
10611061
1062+isHtmlFormat :: Format -> Bool
1063+isHtmlFormat (Format "html") = True
1064+isHtmlFormat (Format "html4") = True
1065+isHtmlFormat (Format "html5") = True
1066+isHtmlFormat _ = False
1067+
10621068transformBlock :: PandocMonad m
10631069 => Block
10641070 -> E m Block
10651071transformBlock (RawBlock fmt raw)
1066− | fmt == Format "html" = do
1072+ | isHtmlFormat fmt = do
10671073 let tags = parseTags raw
10681074 tags' <- mapM transformTag tags
10691075 return $ RawBlock fmt (renderTags' tags')
@@ -1083,7 +1089,7 @@ transformInline opts x@(Math t m)
10831089 return $ Span ("",["math",mathclass],[])
10841090 [Image nullAttr [x] ("../" <> newsrc, "")]
10851091transformInline _opts (RawInline fmt raw)
1086− | fmt == Format "html" = do
1092+ | isHtmlFormat fmt = do
10871093 let tags = parseTags raw
10881094 tags' <- mapM transformTag tags
10891095 return $ RawInline fmt (renderTags' tags')