diff options
author | webzwo0i <webzwo0i@c3d2.de> | 2015-02-15 13:25:57 +0100 |
---|---|---|
committer | webzwo0i <webzwo0i@c3d2.de> | 2015-02-15 13:25:57 +0100 |
commit | 4313bd27f84d29c604d593a69bd09aee5189b290 (patch) | |
tree | 48ca31fb262ff868752b5f734a3905ccb8278cc5 /src/static/js | |
parent | c191a8716ebee37f61cdd4b07aff41f52e90c604 (diff) | |
download | etherpad-lite-4313bd27f84d29c604d593a69bd09aee5189b290.zip |
add a comment to make clear that the string in stringIterator
does not change; only curIndex is increased. Newlines are counted
between curIndex and the end of string.
Diffstat (limited to 'src/static/js')
-rw-r--r-- | src/static/js/Changeset.js | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/static/js/Changeset.js b/src/static/js/Changeset.js index fd658f86..a7ae8e71 100644 --- a/src/static/js/Changeset.js +++ b/src/static/js/Changeset.js @@ -507,6 +507,7 @@ exports.opAssembler = function () { */ exports.stringIterator = function (str) { var curIndex = 0; + // newLines is the number of \n between curIndex and str.length var newLines = str.split("\n").length - 1 function getnewLines(){ return newLines |