Mercurial > genshi > mirror
diff markup/template.py @ 6:71e8e645fe81 trunk
Simplified implementation of `py:content` directive.
author | cmlenz |
---|---|
date | Sun, 04 Jun 2006 10:46:14 +0000 |
parents | dbb08edbc615 |
children | f77f7a91aa46 |
line wrap: on
line diff
--- a/markup/template.py +++ b/markup/template.py @@ -242,11 +242,10 @@ if kind is Stream.START: yield kind, data, pos # emit start tag yield Stream.EXPR, self.expr, pos - previous = None - try: - while True: - previous = stream.next() - except StopIteration: + previous = stream.next() + for event in stream: + previous = event + else: if previous is not None: yield previous