]> git.ipfire.org Git - thirdparty/jinja.git/commit
Add `keep_trailing_newline` to configure final endline stripping 170/head
authorW. Trevor King <wking@tremily.us>
Fri, 11 Jan 2013 13:23:24 +0000 (08:23 -0500)
committerW. Trevor King <wking@tremily.us>
Fri, 11 Jan 2013 13:47:30 +0000 (08:47 -0500)
commit7e912c6dfa7a17dd1334ecb1a8d57dd5722b633a
tree5072fa0f8dda217a8d26c5a56b11521b167f12c5
parent21a2010bf2768bc658e09666c2135063ce004efc
Add `keep_trailing_newline` to configure final endline stripping

This option defaults to False for compatibility with the existing
behaviour.  I've added the option because I expect I won't remember to
keep an extra trailing newline in my templates, and some non-HTML
templates *need* that last newline.

See also:
https://groups.google.com/d/msg/pocoo-libs/6DylMqq1voI/GXTbZJ1Tr-sJ
CHANGES
docs/templates.rst
jinja2/defaults.py
jinja2/environment.py
jinja2/ext.py
jinja2/lexer.py
jinja2/testsuite/lexnparse.py