Edgewall Software

Ticket #270: for-dir-newline.patch

File for-dir-newline.patch, 839 bytes (added by Carsten Klein <carsten.klein@…>, 13 years ago)

Initial version of a patch for this feature

  • directives.py

    (this hunk was shorter than expected) 
    1616from genshi.core import QName, Stream
    1717from genshi.path import Path
    1818from genshi.template.base import TemplateRuntimeError, TemplateSyntaxError, \
    19                                  EXPR, _apply_directives, _eval_expr
     19                                 EXPR, TEXT, _apply_directives, _eval_expr
    2020from genshi.template.eval import Expression, ExpressionASTTransformer, \
    2121                                 _ast, _parse
     
    368381            ctxt.push(scope)
    369382            for event in _apply_directives(stream, directives, ctxt, vars):
    370383                yield event
     384            yield TEXT, '\n', (None, -1, -1)
    371385            ctxt.pop()
    372386
    373387    def __repr__(self):