HTML writer: Don't prefix epub: attributes with data-.

This commit is contained in:
John MacFarlane 2018-08-08 09:53:13 -07:00
parent 6728049225
commit 9752dcd61a

View file

@ -580,6 +580,7 @@ toAttrs kvs = do
return $ map (\(x,y) -> return $ map (\(x,y) ->
customAttribute customAttribute
(fromString (if not html5 || x `Set.member` html5Attributes (fromString (if not html5 || x `Set.member` html5Attributes
|| "epub:" `isPrefixOf` x
|| "data-" `isPrefixOf` x || "data-" `isPrefixOf` x
then x then x
else "data-" ++ x)) (toValue y)) kvs else "data-" ++ x)) (toValue y)) kvs