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.pull/4406/head
parent
92d4b8b649
commit
5aa318a09b
|
@ -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 New Issue