Skip to content

Commit

Permalink
HTML writer: don't add data- prefix to unknown attributes beginning w…
Browse files Browse the repository at this point in the history
…ith data-.

Or we'll get data-data-blah.
  • Loading branch information
jgm committed Oct 17, 2017
1 parent 61641f9 commit 514958f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/Text/Pandoc/Writers/HTML.hs
Original file line number Diff line number Diff line change
Expand Up @@ -551,6 +551,7 @@ toAttrs kvs = do
return $ map (\(x,y) ->
customAttribute
(fromString (if not html5 || x `Set.member` html5Attributes
|| "data-" `isPrefixOf` x
then x
else "data-" ++ x)) (toValue y)) kvs

Expand Down

0 comments on commit 514958f

Please sign in to comment.