summaryrefslogtreecommitdiff
path: root/src/static/js
diff options
context:
space:
mode:
authorwebzwo0i <webzwo0i@c3d2.de>2015-02-15 13:25:57 +0100
committerwebzwo0i <webzwo0i@c3d2.de>2015-02-15 13:25:57 +0100
commit4313bd27f84d29c604d593a69bd09aee5189b290 (patch)
tree48ca31fb262ff868752b5f734a3905ccb8278cc5 /src/static/js
parentc191a8716ebee37f61cdd4b07aff41f52e90c604 (diff)
downloadetherpad-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.js1
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