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:
parent
25bba0cc62
commit
df5ae1c186
2 changed files with 7 additions and 0 deletions
|
@ -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
|
||||
|
|
6
test/command/7546.md
Normal file
6
test/command/7546.md
Normal file
|
@ -0,0 +1,6 @@
|
|||
```
|
||||
% pandoc -t html -f native
|
||||
Span ("", [], [("","")]) []
|
||||
^D
|
||||
<span></span>
|
||||
```
|
Loading…
Reference in a new issue