mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-22 00:16:15 -04:00
hooks: Remove unnecessary callAllStr()
function
This commit is contained in:
parent
3e910b9905
commit
1bc52f4913
2 changed files with 2 additions and 17 deletions
|
@ -93,11 +93,8 @@ linestylefilter.getLineStyleFilter = (lineLength, aline, textAndClassFunc, apool
|
||||||
} else if (linestylefilter.ATTRIB_CLASSES[key]) {
|
} else if (linestylefilter.ATTRIB_CLASSES[key]) {
|
||||||
classes += ` ${linestylefilter.ATTRIB_CLASSES[key]}`;
|
classes += ` ${linestylefilter.ATTRIB_CLASSES[key]}`;
|
||||||
} else {
|
} else {
|
||||||
classes += hooks.callAllStr('aceAttribsToClasses', {
|
const results = hooks.callAll('aceAttribsToClasses', {linestylefilter, key, value});
|
||||||
linestylefilter,
|
classes += ` ${results.join(' ')}`;
|
||||||
key,
|
|
||||||
value,
|
|
||||||
}, ' ', ' ', '');
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -386,18 +386,6 @@ exports.aCallFirst = (hook_name, args, cb, predicate) => {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.callAllStr = (hook_name, args, sep, pre, post) => {
|
|
||||||
if (sep === undefined) sep = '';
|
|
||||||
if (pre === undefined) pre = '';
|
|
||||||
if (post === undefined) post = '';
|
|
||||||
const newCallhooks = [];
|
|
||||||
const callhooks = exports.callAll(hook_name, args);
|
|
||||||
for (let i = 0, ii = callhooks.length; i < ii; i++) {
|
|
||||||
newCallhooks[i] = pre + callhooks[i] + post;
|
|
||||||
}
|
|
||||||
return newCallhooks.join(sep || '');
|
|
||||||
};
|
|
||||||
|
|
||||||
exports.exportedForTestingOnly = {
|
exports.exportedForTestingOnly = {
|
||||||
callHookFnAsync,
|
callHookFnAsync,
|
||||||
callHookFnSync,
|
callHookFnSync,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue