mirror of
https://github.com/ether/etherpad-lite.git
synced 2026-05-08 13:46:10 +02:00
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.
This commit is contained in:
parent
c191a8716e
commit
4313bd27f8
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user