# HG changeset patch # User cmlenz # Date 1153438431 0 # Node ID f648152df7fda583ce75c4a56485994fdcc779ee # Parent 3b75c6730b2953b661fc2b1432a910b4f8488e5d Minor bugfi x follow-up to [97]: don't yield the terminator event from the whitespace filter. diff --git a/markup/filters.py b/markup/filters.py --- a/markup/filters.py +++ b/markup/filters.py @@ -134,7 +134,8 @@ trim_trailing_space('', textbuf.pop())), quotes=False) yield TEXT, output, pos - yield kind, data, pos + if kind is not None: + yield kind, data, pos class HTMLSanitizer(object): diff --git a/markup/template.py b/markup/template.py --- a/markup/template.py +++ b/markup/template.py @@ -366,8 +366,8 @@ def __call__(self, stream, ctxt, directives): iterable = self.expr.evaluate(ctxt) if iterable is not None: + scope = {} stream = list(stream) - scope = {} targets = self.targets for item in iter(iterable): if len(targets) == 1: