mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-22 16:36:15 -04:00
off by 1
This commit is contained in:
parent
4313bd27f8
commit
b4d4b16b1f
1 changed files with 1 additions and 1 deletions
|
@ -910,7 +910,7 @@ exports.pack = function (oldLen, newLen, opsStr, bank) {
|
|||
* @params str {string} String to which a Changeset should be applied
|
||||
*/
|
||||
exports.applyToText = function (cs, str) {
|
||||
var totalNrOfLines = str.split("\n").length;
|
||||
var totalNrOfLines = str.split("\n").length - 1;
|
||||
var removedLines = 0;
|
||||
var unpacked = exports.unpack(cs);
|
||||
exports.assert(str.length == unpacked.oldLen, "mismatched apply: ", str.length, " / ", unpacked.oldLen);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue