projects
/
jinja2.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
58f351d
)
fixed error in wordwrap filter
author
Benjamin Wiegand
<highwaychile@bluevaria.de>
Mon, 9 Jun 2008 17:09:34 +0000
(19:09 +0200)
committer
Benjamin Wiegand
<highwaychile@bluevaria.de>
Mon, 9 Jun 2008 17:09:34 +0000
(19:09 +0200)
--HG--
branch : trunk
jinja2/filters.py
patch
|
blob
|
history
diff --git
a/jinja2/filters.py
b/jinja2/filters.py
index 762b06dd2d83ca4a04beb33cf907ba6f6087f3a7..959b4daee480eb7cd3272aabaa5b5fe321a83c7b 100644
(file)
--- 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):