-
Notifications
You must be signed in to change notification settings - Fork 591
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[JavaScript] Syntax highlighting issue with object methods #403
Comments
Please also provide the code snippets for easier reproduction (though copy'n'paste). |
Right. The last level in this code loses the highlighting: function foo() {
TweenLite.to(el, 1, {
onComplete: function() {
TweenLite.to(el, 1, {
onComplete: function() {
TweenLite.to(el, 1, {
onComplete: function() {
TweenLite.to(el, 1, {
onComplete: function() {
TweenLite.to(el, 1, {
onComplete: function() {
}
});
}
});
}
});
}
});
}
});
} |
I only start losing highlighting with this: function foo() {
TweenLite.to(el, 1, {
onComplete: function() {
TweenLite.to(el, 1, {
onComplete: function() {
TweenLite.to(el, 1, {
onComplete: function() {
TweenLite.to(el, 1, {
onComplete: function() {
TweenLite.to(el, 1, {
onComplete: function() {
TweenLite.to(el, 1, {
onComplete: function() {
TweenLite.to(el, 1, {
onComplete: function() {
TweenLite.to(el, 1, {
onComplete: function() {
TweenLite.to(el, 1, {
onComplete: function() {
TweenLite.to(el, 1, {
onComplete: function() {
TweenLite.to(el, 1, {
onComplete: function() {
TweenLite.to(el, 1, {
onComplete: function() {
TweenLite.to(el, 1, {
onComplete: function() {
TweenLite.to(el, 1, {
onComplete: function() {
TweenLite.to(el, 1, {
onComplete: function() {
}
});
}
});
}
});
}
});
}
});
}
});
}
});
}
});
}
});
}
});
}
});
}
});
}
});
}
});
}
});
} which is a side effect of the scope name becoming to long. In the empty line, the exact scope name would be:
which is really long and code probably shouldn't be nested that deeply, which is why ST probably assumes that any scope beyond a specific length is the result of an errorneous syntax definition and stops highlighting in order not to freeze up entirely. As a side bug report, this shouldn't be a |
Interestingly, I lose highlighting and then seem to re-gain it. Notice how the The |
@FichteFoll I don't see where it is beginning with |
@wbond, yes you're right, the So I guess the only problem here is that the number |
Using the scope inspector, all of the scopes seem correct. The strange thing is that the I'm looking into the core code base to see what is the cause of the weirdness. This should probably be moved over to the core issue tracker. |
This will be fixed in dev build 3115. It was a bug in Sublime Text proper, and not the syntax. |
Confirmed fixed in 3116, by the way. |
Stable Build 3114
Same method body loses highlighting when nested too deep.
The text was updated successfully, but these errors were encountered: