diff options
author | mkanat%bugzilla.org <> | 2007-09-17 11:48:04 +0200 |
---|---|---|
committer | mkanat%bugzilla.org <> | 2007-09-17 11:48:04 +0200 |
commit | 61ac61f0a55f8e07ee4eb6be325b7d53ca64e7fe (patch) | |
tree | 0431b21137267c9d25a2a8549718eae256b4104c /Bugzilla/Util.pm | |
parent | e2ced36948e4edd9ad6354cb183a92ef6aebee45 (diff) | |
download | bugzilla-61ac61f0a55f8e07ee4eb6be325b7d53ca64e7fe.tar.gz bugzilla-61ac61f0a55f8e07ee4eb6be325b7d53ca64e7fe.tar.xz |
Bug 357315: Add the ability to create <textarea> fields
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=LpSolit, a=LpSolit
Diffstat (limited to 'Bugzilla/Util.pm')
-rw-r--r-- | Bugzilla/Util.pm | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Bugzilla/Util.pm b/Bugzilla/Util.pm index 87caa0527..e15edc6b5 100644 --- a/Bugzilla/Util.pm +++ b/Bugzilla/Util.pm @@ -312,11 +312,11 @@ sub diff_strings { } sub wrap_comment { - my ($comment) = @_; + my ($comment, $cols) = @_; my $wrappedcomment = ""; # Use 'local', as recommended by Text::Wrap's perldoc. - local $Text::Wrap::columns = COMMENT_COLS; + local $Text::Wrap::columns = $cols || COMMENT_COLS; # Make words that are longer than COMMENT_COLS not wrap. local $Text::Wrap::huge = 'overflow'; # Don't mess with tabs. @@ -332,6 +332,7 @@ sub wrap_comment { } } + chomp($wrappedcomment); # Text::Wrap adds an extra newline at the end. return $wrappedcomment; } |