diff markup/template.py @ 185:95c3813a00de trunk

Fix for #34: `py:def` macros can now be invoked from within expressions in attribute values.
author cmlenz
date Tue, 22 Aug 2006 14:52:44 +0000
parents 181d292eafa2
children 769d945ac030
line wrap: on
line diff
--- a/markup/template.py
+++ b/markup/template.py
@@ -910,12 +910,11 @@
                         value = substream
                     else:
                         values = []
-                        for subkind, subdata, subpos in substream:
-                            if subkind is EXPR:
-                                values.append(subdata.evaluate(ctxt))
-                            else:
+                        for subkind, subdata, subpos in self._eval(substream,
+                                                                   ctxt):
+                            if subkind is TEXT:
                                 values.append(subdata)
-                        value = [unicode(x) for x in values if x is not None]
+                        value = [x for x in values if x is not None]
                         if not value:
                             continue
                     new_attrib.append((name, u''.join(value)))
Copyright (C) 2012-2017 Edgewall Software