Mercurial > genshi > genshi-test
diff genshi/template/markup.py @ 927:a1f3bbe1a680 stable-0.6.x
Merge r1149 from trunk (fix for tail selecting issue #399).
author | hodgestar |
---|---|
date | Thu, 10 Mar 2011 08:41:05 +0000 |
parents | 85e4678337cf |
children |
line wrap: on
line diff
--- a/genshi/template/markup.py +++ b/genshi/template/markup.py @@ -308,8 +308,7 @@ """ match_templates = ctxt._match_templates - tail = [] - def _strip(stream, append=tail.append): + def _strip(stream, append): depth = 1 next = stream.next while 1: @@ -353,7 +352,8 @@ pre_end = idx + 1 if 'match_once' not in hints and 'not_recursive' in hints: pre_end -= 1 - inner = _strip(stream) + tail = [] + inner = _strip(stream, tail.append) if pre_end > 0: inner = self._match(inner, ctxt, start=start, end=pre_end, **vars)