hooks: Remove unnecessary callAllStr() function

This commit is contained in:
Richard Hansen 2021-01-30 20:29:49 -05:00 committed by John McLear
parent 3e910b9905
commit 1bc52f4913
2 changed files with 2 additions and 17 deletions

View file

@ -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,
}, ' ', ' ', '');
} }
} }
} }

View file

@ -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,