mirror of
https://github.com/jgm/pandoc.git
synced 2026-08-28 17:20:47 +08:00
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.
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
```
|
||||
% pandoc -t html -f native
|
||||
Span ("", [], [("","")]) []
|
||||
^D
|
||||
<span></span>
|
||||
```
|
||||
Reference in New Issue
Block a user