git.iko.soy/typeable/pandoc
on master help sign in
HTML writer: don't add data- prefix to unknown attributes beginning with data-.

Or we'll get data-data-blah.

commit514958f5eaac17b6429118f8a59f10baeeb124fd authorJohn MacFarlane <jgm@berkeley.edu> dateMon 16 Oct 2017, 23:06 (9 years ago) parent61641f9
1 file changed+1
src/Text/Pandoc/Writers/HTML.hs+1
src/Text/Pandoc/Writers/HTML.hs+1
@@ -551,6 +551,7 @@ toAttrs kvs = do
551551 return $ map (\(x,y) ->
552552 customAttribute
553553 (fromString (if not html5 || x `Set.member` html5Attributes
554+ || "data-" `isPrefixOf` x
554555 then x
555556 else "data-" ++ x)) (toValue y)) kvs
556557