Mercurial > genshi > genshi-test
comparison genshi/template/markup.py @ 830:de82830f8816 experimental-inline
inline branch: synced with trunk@1038.
author | cmlenz |
---|---|
date | Fri, 13 Mar 2009 20:04:26 +0000 |
parents | 1837f39efd6f |
children | 09cc3627654c |
comparison
equal
deleted
inserted
replaced
828:eb8aa8690480 | 830:de82830f8816 |
---|---|
354 pre_end = idx + 1 | 354 pre_end = idx + 1 |
355 if 'match_once' not in hints and 'not_recursive' in hints: | 355 if 'match_once' not in hints and 'not_recursive' in hints: |
356 pre_end -= 1 | 356 pre_end -= 1 |
357 inner = _strip(stream) | 357 inner = _strip(stream) |
358 if pre_end > 0: | 358 if pre_end > 0: |
359 inner = self._match(inner, ctxt, end=pre_end) | 359 inner = self._match(inner, ctxt, end=pre_end, **vars) |
360 content = self._include(chain([event], inner, tail), ctxt) | 360 content = self._include(chain([event], inner, tail), ctxt) |
361 if 'not_buffered' not in hints: | 361 if 'not_buffered' not in hints: |
362 content = list(content) | 362 content = list(content) |
363 | 363 |
364 # Make the select() function available in the body of the | 364 # Make the select() function available in the body of the |
369 return Stream(content).select(path, namespaces, ctxt) | 369 return Stream(content).select(path, namespaces, ctxt) |
370 vars = dict(select=select) | 370 vars = dict(select=select) |
371 | 371 |
372 # Recursively process the output | 372 # Recursively process the output |
373 template = _apply_directives(template, directives, ctxt, | 373 template = _apply_directives(template, directives, ctxt, |
374 **vars) | 374 vars) |
375 for event in self._match(self._flatten(template, ctxt, | 375 for event in self._match(self._flatten(template, ctxt, |
376 **vars), | 376 **vars), |
377 ctxt, start=idx + 1, **vars): | 377 ctxt, start=idx + 1, **vars): |
378 yield event | 378 yield event |
379 | 379 |