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++) {
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