- adjust the new multiline ${} in tag feature to allow trailing whitespace,
doesn't occur on Python 2.7
diff --git a/mako/parsetree.py b/mako/parsetree.py
index 824762d..12b0498 100644
--- a/mako/parsetree.py
+++ b/mako/parsetree.py
@@ -268,14 +268,16 @@
         for key in self.attributes:
             if key in expressions:
                 expr = []
-                for x in re.compile(r'(\${.+?})', re.S).split(self.attributes[key]):
+                for x in re.compile(r'(\${.+?})',
+                                    re.S).split(self.attributes[key]):
                     m = re.compile(r'^\${(.+?)}$', re.S).match(x)
                     if m:
-                        code = ast.PythonCode(m.group(1), **self.exception_kwargs)
-                        undeclared_identifiers = undeclared_identifiers.union(
-                                                        code.undeclared_identifiers
-                                                    )
-                        expr.append("(%s)" % m.group(1))
+                        code = ast.PythonCode(m.group(1).rstrip(),
+                                **self.exception_kwargs)
+                        undeclared_identifiers = \
+                            undeclared_identifiers.union(
+                                    code.undeclared_identifiers)
+                        expr.append('(%s)' % m.group(1))
                     else:
                         if x:
                             expr.append(repr(x))
@@ -391,7 +393,8 @@
     def undeclared_identifiers(self):
         res = []
         for c in self.function_decl.defaults:
-            res += list(ast.PythonCode(c, **self.exception_kwargs).undeclared_identifiers)
+            res += list(ast.PythonCode(c, **self.exception_kwargs).
+                                    undeclared_identifiers)
         return res + list(self.filter_args.\
                             undeclared_identifiers.\
                             difference(filters.DEFAULT_ESCAPES.keys())
diff --git a/test/test_call.py b/test/test_call.py
index d47ec11..fecb2de 100644
--- a/test/test_call.py
+++ b/test/test_call.py
@@ -47,6 +47,9 @@
     def test_new_syntax(self):
         """test foo:bar syntax, including multiline args and expression eval."""
         
+        # note the trailing whitespace in the bottom ${} expr, need to strip
+        # that off < python 2.7
+        
         t = Template("""
             <%def name="foo(x, y, q, z)">
                 ${x}
@@ -64,7 +67,9 @@
                 (1, 2),
                 (3, 4),
                 (5, 6)
-            ]}"/>
+            ]
+            
+            }"/>
         """)
         
         eq_(