git.iko.soy/typeable/pandoc
on master help sign in
HTML writer: don't add data- prefix to unknown attributes beginning with data-.
514958fJohn MacFarlane
src/Text/Pandoc/Writers/HTML.hs+1
@@ -551,6 +551,7 @@ toAttrs kvs = do
551 return $ map (\(x,y) ->
551 return $ map (\(x,y) ->
552 customAttribute
552 customAttribute
553 (fromString (if not html5 || x `Set.member` html5Attributes
553 (fromString (if not html5 || x `Set.member` html5Attributes
554+ || "data-" `isPrefixOf` x
554 then x
555 then x
555 else "data-" ++ x)) (toValue y)) kvs
556 else "data-" ++ x)) (toValue y)) kvs
556
557