Commit f80758fc authored by Byron Jones's avatar Byron Jones

Bug 657947: Add trailing newlines after quoted reply

r=dkl, a=LpSolit
parent b3247a81
...@@ -80,7 +80,7 @@ function expand_comment(link, comment) { ...@@ -80,7 +80,7 @@ function expand_comment(link, comment) {
function wrapReplyText(text) { function wrapReplyText(text) {
// This is -3 to account for "\n> " // This is -3 to account for "\n> "
var maxCol = BUGZILLA.constant.COMMENT_COLS - 3; 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(); var wrapped_lines = new Array();
for (var i = 0; i < text_lines.length; i++) { for (var i = 0; i < text_lines.length; i++) {
...@@ -121,7 +121,7 @@ function wrapReplyText(text) { ...@@ -121,7 +121,7 @@ function wrapReplyText(text) {
replace_lines.push(paragraph); replace_lines.push(paragraph);
wrapped_lines.push("> " + replace_lines.join("\n> ")); 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 /* This way, we are sure that browsers which do not support JS
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment