Closed pdknsk closed 7 years ago
Alternatively, each callback function can be replaced with not less than 3
regular functions, in any order.
x.y(function() {
x.y(function() {
x.y(function() {
x.y(function() {
x.y(function() {
function() {
function() {
function() {
var z = '\u1000';
};
};
};
});
});
});
});
});
Which ST build are you seeing this on? It seems fine for me in 3142 with the default JavaScript syntax.
Your comment made me try Monokai – works. Only occurs with Blackboard, and perhaps others.
I enabled legacy color schemes and tried, but it still looks okay to me:
It seems to me like a similar issue to https://github.com/sublimehq/Packages/issues/403, but that was solved in build 3115. Can you confirm what ST build you are using please?
I'm on 3126
and tried both the default and the most-recent from-here package.
I only noticed after commenting that your image exhibits the bug!
Oh I see it now too :) sorry, not used to that color scheme so wasn't sure what to look for.
It looks like the scoring given for the scope selector string
and the scope selector constant
used in Blackboard.tmTheme
are the same:
>>> sublime.score_selector('source.js meta.function-call.method.js meta.group.js meta.block.js meta.function-call.method.js meta.group.js meta.block.js meta.function-call.method.js meta.group.js meta.block.js meta.function-call.method.js meta.group.js meta.block.js meta.function-call.method.js meta.group.js meta.block.js meta.block.js meta.block.js meta.block.js string.quoted.single.js constant.character.escape.js', 'constant')
1152921504606846976
>>> sublime.score_selector('source.js meta.function-call.method.js meta.group.js meta.block.js meta.function-call.method.js meta.group.js meta.block.js meta.function-call.method.js meta.group.js meta.block.js meta.function-call.method.js meta.group.js meta.block.js meta.function-call.method.js meta.group.js meta.block.js meta.block.js meta.block.js meta.block.js string.quoted.single.js constant.character.escape.js', 'string')
1152921504606846976
Normally constant
would indeed have a higher match score, but I guess that is the largest scope stack / match score that ST can deal with:
>>> sublime.score_selector('source.js string.quoted.single.js constant.character.escape.js', 'string')
64
>>> sublime.score_selector('source.js string.quoted.single.js constant.character.escape.js', 'constant')
512
As string
is defined on line 93, and constant
on line 41, string
takes precedence when the scores are equal - you can "fix" this by moving the constant
rules lower down in the tmTheme
file so they will take precedence over string
.
As this is a legacy color scheme, I'm not sure if such a change will be made to the version that comes with ST.
Thanks! Works for me. It seems inevitable to eventually move off of Blackboard. I noticed some nice features in Monokai missing in Blackboard, like cursive formatting.
One less and it works.