# HG changeset patch
# User cmlenz
# Date 1152739650 0
# Node ID c3c26300a46d2161f1e2f323c8f7cebc71d61337
# Parent 3c271699c39839a05473a5fe49e0401ee30346ec
Empty attributes in templates were being stripped out. Thanks to Jonas for the patch.
diff --git a/markup/template.py b/markup/template.py
--- a/markup/template.py
+++ b/markup/template.py
@@ -717,7 +717,10 @@
raise BadDirectiveError(name, pos[0], pos[1])
directives.append(cls(value))
else:
- value = list(self._interpolate(value, *pos))
+ if value:
+ value = list(self._interpolate(value, *pos))
+ else:
+ value = [(TEXT, u'', pos)]
new_attrib.append((name, value))
if directives:
diff --git a/markup/tests/template.py b/markup/tests/template.py
--- a/markup/tests/template.py
+++ b/markup/tests/template.py
@@ -417,9 +417,12 @@
self.assertEqual('