Call the aceAttribClasses hook synchronously
We could instead await the results of the hook, but then all callers and their callers recursively would have to be converted to async, and that's a huge change.
This commit is contained in:
parent
92d4b8b649
commit
5aa318a09b
1 changed files with 2 additions and 5 deletions
|
@ -59,11 +59,8 @@ linestylefilter.getLineStyleFilter = function(lineLength, aline, textAndClassFun
|
|||
{
|
||||
|
||||
// Plugin Hook to add more Attrib Classes
|
||||
hooks.aCallAll('aceAttribClasses', linestylefilter.ATTRIB_CLASSES, function(err, ATTRIB_CLASSES){
|
||||
if(ATTRIB_CLASSES.length >= 1){
|
||||
linestylefilter.ATTRIB_CLASSES = ATTRIB_CLASSES[0];
|
||||
}
|
||||
});
|
||||
const results = hooks.callAll('aceAttribClasses', linestylefilter.ATTRIB_CLASSES);
|
||||
if (results.length >= 1) linestylefilter.ATTRIB_CLASSES = results[0];
|
||||
|
||||
if (lineLength == 0) return textAndClassFunc;
|
||||
|
||||
|
|
Loading…
Reference in a new issue