From: Benjamin Wiegand Date: Mon, 9 Jun 2008 17:09:34 +0000 (+0200) Subject: fixed error in wordwrap filter X-Git-Tag: 2.0~23^2^2 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=4388cd059d73c810dabc2cce0366c21ce2669d5c;p=jinja2.git fixed error in wordwrap filter --HG-- branch : trunk --- diff --git a/jinja2/filters.py b/jinja2/filters.py index 762b06d..959b4da 100644 --- a/jinja2/filters.py +++ b/jinja2/filters.py @@ -366,9 +366,9 @@ def do_wordwrap(s, width=79, break_long_words=True): parameter. If you set the second parameter to `false` Jinja will not split words apart if they are longer than `width`. """ - return textwrap.wrap(s, width=width, expand_tabs=False, - replace_whitespace=False, - break_long_words=break_long_words) + return u'\n'.join(textwrap.wrap(s, width=width, expand_tabs=False, + replace_whitespace=False, + break_long_words=break_long_words)) def do_wordcount(s):