aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Text/Pandoc/Writers/HTML.hs1
-rw-r--r--test/command/7546.md6
2 files changed, 7 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
diff --git a/test/command/7546.md b/test/command/7546.md
new file mode 100644
index 000000000..aed17275e
--- /dev/null
+++ b/test/command/7546.md
@@ -0,0 +1,6 @@
+```
+% pandoc -t html -f native
+Span ("", [], [("","")]) []
+^D
+<span></span>
+```