Allow a pad to only end with a single newline, rather than requiring two.

pull/2696/head
Xavid 2015-06-19 14:02:18 -04:00
parent ef5e62e3a1
commit 0713553906
1 changed files with 3 additions and 2 deletions

View File

@ -773,8 +773,9 @@ function handleUserChanges(data, cb)
}
// Make sure the pad always ends with an empty line.
if (pad.text().lastIndexOf("\n\n") != pad.text().length-2) {
var nlChangeset = Changeset.makeSplice(pad.text(), pad.text().length-1, 0, "\n");
if (pad.text().lastIndexOf("\n") != pad.text().length-1) {
var nlChangeset = Changeset.makeSplice(pad.text(), pad.text().length-1,
0, "\n");
pad.appendRevision(nlChangeset);
}