mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-21 16:06:16 -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]) {
|
||||
classes += ` ${linestylefilter.ATTRIB_CLASSES[key]}`;
|
||||
} else {
|
||||
classes += hooks.callAllStr('aceAttribsToClasses', {
|
||||
linestylefilter,
|
||||
key,
|
||||
value,
|
||||
}, ' ', ' ', '');
|
||||
const results = hooks.callAll('aceAttribsToClasses', {linestylefilter, key, value});
|
||||
classes += ` ${results.join(' ')}`;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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 = {
|
||||
callHookFnAsync,
|
||||
callHookFnSync,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue