Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

Fix missing highlighting in case statements #405

Merged
merged 3 commits into from
Aug 19, 2016
Merged

Fix missing highlighting in case statements #405

merged 3 commits into from
Aug 19, 2016

Conversation

Alhadis
Copy link
Contributor

@Alhadis Alhadis commented Aug 19, 2016

Some values don't receive their usual highlighting when used inside a case statement:

Figure 1

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.

Alhadis 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.
@Alhadis Alhadis changed the title Fix missing highlighting of primitives/globals in case statements Fix missing highlighting in case statements Aug 19, 2016
@winstliu
Copy link
Contributor

Can you triple-quote the extended regexes?

@winstliu winstliu merged commit f9520c4 into atom:master Aug 19, 2016
@Alhadis Alhadis deleted the case-fix branch August 19, 2016 16:45
@Alhadis
Copy link
Contributor Author

Alhadis commented Aug 19, 2016

Ah, sorry! Fixed. =)

You might wanna fix the expressions on lines 53, 89, and a few others too...

@Alhadis
Copy link
Contributor Author

Alhadis commented Aug 19, 2016

(I would've changed 'em, but I didn't want this PR changing unrelated code...)

@winstliu
Copy link
Contributor

When I have time™ I guess :P.

@Alhadis
Copy link
Contributor Author

Alhadis commented Aug 19, 2016

Take some of mine, I've got plenty.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants