This repository was archived by the owner on Dec 15, 2022. It is now read-only.
Fix missing highlighting in case statements#405
Merged
winstliu merged 3 commits intoatom:masterfrom Aug 19, 2016
Alhadis:case-fix
Merged
Fix missing highlighting in case statements#405winstliu merged 3 commits intoatom:masterfrom Alhadis:case-fix
winstliu merged 3 commits intoatom:masterfrom
Alhadis:case-fix
Conversation
added 2 commits
August 20, 2016 01:05
Certain primitives and "special" variables (such as "this" or __dirname) lose their highlighting when used in a case statement. This commit fixes that - even if "case debugger:" isn't valid JavaScript, an author should still be aware of the keyword's significance.
Contributor
|
Can you triple-quote the extended regexes? |
Contributor
Author
Contributor
Author
|
(I would've changed 'em, but I didn't want this PR changing unrelated code...) |
Contributor
|
When I have time™ I guess :P. |
Contributor
Author
|
Take some of mine, I've got plenty. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Some values don't receive their usual highlighting when used inside a case statement:
Not all of these statements are valid JavaScript (e.g.,
case debugger:), but authors should probably be reminded of a keyword's significance through highlighting.