When setting the newline_sequence environment parameter to, say \r\n, and if the wordwrap filter is used, the resulting file contains a mix of \n and \r\n, which, imo, isn't an acceptable behavior.
I'm not sure if this is a design decision and if there is a rationale behind it. In any case, a patch (sevas/jinja2@218cb64) is available in the branch 'wordwrap-newline' of my fork.
A pull request has been initiated.
This is already fixed in 012d017. See also https://github.com/mitsuhiko/jinja2/blob/master/jinja2/filters.py#L494.
Can this be closed?