mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-21 16:06:16 -04:00
editor: Delete unused optModFunc
argument
This commit is contained in:
parent
d0114d4ac2
commit
ed7ba64635
1 changed files with 2 additions and 9 deletions
|
@ -928,7 +928,7 @@ function Ace2Inner() {
|
|||
}
|
||||
|
||||
|
||||
function recolorLinesInRange(startChar, endChar, isTimeUp, optModFunc) {
|
||||
function recolorLinesInRange(startChar, endChar, isTimeUp) {
|
||||
if (endChar <= startChar) return;
|
||||
if (startChar < 0 || startChar >= rep.lines.totalWidth()) return;
|
||||
let lineEntry = rep.lines.atOffset(startChar); // rounds down to line boundary
|
||||
|
@ -942,16 +942,9 @@ function Ace2Inner() {
|
|||
// tokenFunc function; accesses current value of lineEntry and curDocChar,
|
||||
// also mutates curDocChar
|
||||
let curDocChar;
|
||||
let tokenFunc = function (tokenText, tokenClass) {
|
||||
const tokenFunc = function (tokenText, tokenClass) {
|
||||
lineEntry.domInfo.appendSpan(tokenText, tokenClass);
|
||||
};
|
||||
if (optModFunc) {
|
||||
const f = tokenFunc;
|
||||
tokenFunc = function (tokenText, tokenClass) {
|
||||
optModFunc(tokenText, tokenClass, f, curDocChar);
|
||||
curDocChar += tokenText.length;
|
||||
};
|
||||
}
|
||||
|
||||
while (lineEntry && lineStart < endChar && !isTimeUp()) {
|
||||
const lineEnd = lineStart + lineEntry.width;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue