mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-01-31 19:02:59 +01:00
Changeset: Remove unused start index parameter for opIterator()
This commit is contained in:
parent
43dae4cb1d
commit
0fd2a46783
2 changed files with 5 additions and 5 deletions
|
@ -38,6 +38,8 @@
|
|||
* `author`: Deprecated; use the new `authorId` property instead.
|
||||
* `readonly`: Deprecated; use the new `readOnly` property instead.
|
||||
* `rev`: Deprecated.
|
||||
* Changes to the `src/static/js/Changeset.js` library:
|
||||
* `opIterator()`: The unused start index parameter has been removed.
|
||||
|
||||
### Notable enhancements
|
||||
|
||||
|
|
|
@ -142,13 +142,11 @@ exports.newLen = (cs) => exports.unpack(cs).newLen;
|
|||
* Creates an iterator which decodes string changeset operations.
|
||||
*
|
||||
* @param {string} opsStr - String encoding of the change operations to perform.
|
||||
* @param {number} [optStartIndex=0] - From where in the string should the iterator start.
|
||||
* @returns {OpIter} Operator iterator object.
|
||||
*/
|
||||
exports.opIterator = (opsStr, optStartIndex) => {
|
||||
exports.opIterator = (opsStr) => {
|
||||
const regex = /((?:\*[0-9a-z]+)*)(?:\|([0-9a-z]+))?([-+=])([0-9a-z]+)|\?|/g;
|
||||
const startIndex = (optStartIndex || 0);
|
||||
let curIndex = startIndex;
|
||||
let curIndex = 0;
|
||||
let prevIndex = curIndex;
|
||||
|
||||
const nextRegexMatch = () => {
|
||||
|
@ -2037,7 +2035,7 @@ exports.makeAttribsString = (opcode, attribs, pool) => {
|
|||
* Like "substring" but on a single-line attribution string.
|
||||
*/
|
||||
exports.subattribution = (astr, start, optEnd) => {
|
||||
const iter = exports.opIterator(astr, 0);
|
||||
const iter = exports.opIterator(astr);
|
||||
const assem = exports.smartOpAssembler();
|
||||
const attOp = exports.newOp();
|
||||
const csOp = exports.newOp();
|
||||
|
|
Loading…
Reference in a new issue