Mercurial > p > roundup > code
diff roundup/cgi/templating.py @ 5043:ac0c117cd24c
Remove wrap and associated functions from roundup.support
The wrap function duplicates functionality that is already provided by
the inbuilt textwrap module since python v2.3. The wrap function is only
used in one place so lets just replace it with the equivalent in-built
function.
| author | John Kristensen <john@jerrykan.com> |
|---|---|
| date | Thu, 12 Feb 2015 00:55:00 +1100 |
| parents | bb97f61e1b73 |
| children | b69c5e763295 |
line wrap: on
line diff
--- a/roundup/cgi/templating.py Sun Jan 17 22:12:48 2016 +1100 +++ b/roundup/cgi/templating.py Thu Feb 12 00:55:00 2015 +1100 @@ -21,7 +21,8 @@ import cgi, urllib, re, os.path, mimetypes, csv -import calendar, textwrap +import calendar +import textwrap from roundup import hyperdb, date, support from roundup import i18n @@ -1426,7 +1427,7 @@ if self._value is None: return '' - s = support.wrap(str(self._value), width=80) + s = '\n'.join(textwrap.wrap(str(self._value), 80)) if escape: s = cgi.escape(s) if hyperlink:
