mitsuhiko/jinja2 — pull request #170 by wking (2013-01-11 13:30:33+00:00)
Title: 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

On 2011-02-28, Armin Ronacher wrote:
> I will update the documentation for sure and consider adding a flag
> that controls the trailing one.

Here's the flag, all done up with a bow and a unittest ;).