mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-01-31 19:02:59 +01:00
Changeset: Delete unused code
This commit is contained in:
parent
eb495e9ea2
commit
34cfff4e4c
1 changed files with 0 additions and 29 deletions
|
@ -159,17 +159,6 @@ exports.newOp = (optOpcode) => ({
|
|||
attribs: '',
|
||||
});
|
||||
|
||||
/**
|
||||
* Clones an Op
|
||||
* @param op Op to be cloned
|
||||
*/
|
||||
exports.cloneOp = (op) => ({
|
||||
opcode: op.opcode,
|
||||
chars: op.chars,
|
||||
lines: op.lines,
|
||||
attribs: op.attribs,
|
||||
});
|
||||
|
||||
/**
|
||||
* Copies op1 to op2
|
||||
* @param op1 src Op
|
||||
|
@ -182,17 +171,6 @@ exports.copyOp = (op1, op2) => {
|
|||
op2.attribs = op1.attribs;
|
||||
};
|
||||
|
||||
/**
|
||||
* Writes the Op in a string the way that changesets need it
|
||||
*/
|
||||
exports.opString = (op) => {
|
||||
// just for debugging
|
||||
if (!op.opcode) return 'null';
|
||||
const assem = exports.opAssembler();
|
||||
assem.append(op);
|
||||
return assem.toString();
|
||||
};
|
||||
|
||||
/**
|
||||
* Used to check if a Changeset if valid
|
||||
* @param cs {Changeset} Changeset to be checked
|
||||
|
@ -556,8 +534,6 @@ exports.textLinesMutator = (lines) => {
|
|||
lines.splice.apply(lines, s);
|
||||
};
|
||||
|
||||
const lines_toSource = () => lines.toSource();
|
||||
|
||||
/**
|
||||
* Get a line from lines at given index
|
||||
* @param {Number} idx an index
|
||||
|
@ -630,10 +606,6 @@ exports.textLinesMutator = (lines) => {
|
|||
*/
|
||||
const isCurLineInSplice = () => (curLine - curSplice[0] < (curSplice.length - 2));
|
||||
|
||||
const debugPrint = (typ) => { /* eslint-disable-line no-unused-vars */
|
||||
print(`${typ}: ${curSplice.toSource()} / ${curLine},${curCol} / ${lines_toSource()}`);
|
||||
};
|
||||
|
||||
/**
|
||||
* Incorporates current line into the splice
|
||||
* and marks its old position to be deleted.
|
||||
|
@ -1424,7 +1396,6 @@ exports.makeSplice = (oldFullText, spliceStart, numRemoved, newText, optNewTextA
|
|||
* @param cs Changeset
|
||||
*/
|
||||
exports.toSplices = (cs) => {
|
||||
//
|
||||
const unpacked = exports.unpack(cs);
|
||||
const splices = [];
|
||||
|
||||
|
|
Loading…
Reference in a new issue