Index: markup/tests/template.py
===================================================================
--- markup/tests/template.py (revision 79)
+++ markup/tests/template.py (working copy)
@@ -421,6 +421,11 @@
tmpl = Template('')
self.assertEqual('', str(tmpl.generate(ctxt)))
+ def test_empty_attr(self):
+ ctxt = Context()
+ tmpl = Template('')
+ self.assertEqual('', str(tmpl.generate(ctxt)))
+
def test_bad_directive_error(self):
xml = '
'
try:
Index: markup/template.py
===================================================================
--- markup/template.py (revision 79)
+++ markup/template.py (working copy)
@@ -765,6 +765,8 @@
@param offset: the column number at which the text starts in the source
(optional)
"""
+ if text == '':
+ return iter([(TEXT, '', (filename, lineno, offset))])
def _interpolate(text, patterns):
for idx, group in enumerate(patterns.pop(0).split(text)):
if idx % 2: