diff options
author | Byron Jones <bjones@mozilla.com> | 2011-05-20 14:49:10 +0800 |
---|---|---|
committer | Byron Jones <bjones@mozilla.com> | 2011-05-20 14:49:10 +0800 |
commit | f80758fce316b1cc3ac0a295251e66e432aba1e4 (patch) | |
tree | 5ade7ea6704b080c92bcf28f89469e2426cfe377 | |
parent | b3247a8197d6b7ee7f5e157d39cd28eb97690f90 (diff) | |
download | bugs-f80758fce316b1cc3ac0a295251e66e432aba1e4.tar bugs-f80758fce316b1cc3ac0a295251e66e432aba1e4.tar.gz bugs-f80758fce316b1cc3ac0a295251e66e432aba1e4.tar.bz2 bugs-f80758fce316b1cc3ac0a295251e66e432aba1e4.tar.xz bugs-f80758fce316b1cc3ac0a295251e66e432aba1e4.zip |
Bug 657947: Add trailing newlines after quoted reply
r=dkl, a=LpSolit
-rw-r--r-- | js/comments.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/js/comments.js b/js/comments.js index d9c0f5033..f46499b62 100644 --- a/js/comments.js +++ b/js/comments.js @@ -80,7 +80,7 @@ function expand_comment(link, comment) { function wrapReplyText(text) { // This is -3 to account for "\n> " var maxCol = BUGZILLA.constant.COMMENT_COLS - 3; - var text_lines = text.split("\n"); + var text_lines = text.replace(/[\s\n]+$/, '').split("\n"); var wrapped_lines = new Array(); for (var i = 0; i < text_lines.length; i++) { @@ -121,7 +121,7 @@ function wrapReplyText(text) { replace_lines.push(paragraph); wrapped_lines.push("> " + replace_lines.join("\n> ")); } - return wrapped_lines.join("\n"); + return wrapped_lines.join("\n") + "\n\n"; } /* This way, we are sure that browsers which do not support JS |