diff options
author | John MacFarlane <jgm@berkeley.edu> | 2021-11-19 08:50:18 -0800 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2021-11-19 08:50:18 -0800 |
commit | df5ae1c186ed625e25cf6f080ddf24549f7af22e (patch) | |
tree | e4e2c7568960f66a945df676984ea9bb2dd1b9ca /src/Text/Pandoc | |
parent | 25bba0cc62dae54b5b5a4a9ba540fa7b1ec54530 (diff) | |
download | pandoc-df5ae1c186ed625e25cf6f080ddf24549f7af22e.tar.gz |
HTML writer: Don't create invalid `data-` attribute...
for empty attribute key. (It would be better to make these
unrepresentable in the type system, but for now this is
an improvement.)
Closes #7546.
Diffstat (limited to 'src/Text/Pandoc')
-rw-r--r-- | src/Text/Pandoc/Writers/HTML.hs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/Text/Pandoc/Writers/HTML.hs b/src/Text/Pandoc/Writers/HTML.hs index 0a4c47387..247cddfc9 100644 --- a/src/Text/Pandoc/Writers/HTML.hs +++ b/src/Text/Pandoc/Writers/HTML.hs @@ -633,6 +633,7 @@ toAttrs kvs = do return (keys, attrs) else return (Set.insert k keys, addAttr html5 mbEpubVersion k v attrs) addAttr html5 mbEpubVersion x y + | T.null x = id -- see #7546 | html5 = if x `Set.member` (html5Attributes <> rdfaAttributes) || T.any (== ':') x -- e.g. epub: namespace |