mirror of
https://github.com/django/django.git
synced 2025-09-22 18:22:40 +00:00
Fixed #3714 -- Fixed handling of indented text in wordwrap template filter. Thanks for the fix, Ian Clelland.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4753 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
83bed03a59
commit
b8eec54041
2 changed files with 7 additions and 1 deletions
|
@ -17,7 +17,7 @@ def wrap(text, width):
|
|||
pos = len(word) - word.rfind('\n') - 1
|
||||
for word in it:
|
||||
if "\n" in word:
|
||||
lines = word.splitlines()
|
||||
lines = word.split('\n')
|
||||
else:
|
||||
lines = (word,)
|
||||
pos += len(lines[0]) + 1
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue