Minor bugfi x follow-up to [97]: don't yield the terminator event from the whitespace filter.
author |
cmlenz |
date |
Thu, 20 Jul 2006 23:33:51 +0000 |
parents |
01d36818bb3d |
children |
0f8800c46e21 |
files |
markup/filters.py markup/template.py |
diffstat |
2 files changed, 3 insertions(+), 2 deletions(-)
[+]
|
line diff
--- 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):
--- 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: