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
winstliu merged 3 commits into
atom:masterfrom
Alhadis:case-fix
Aug 19, 2016
Merged

winstliu merged 3 commits into
atom:masterfrom
Alhadis:case-fix

Conversation

@Alhadis

@Alhadis Alhadis commented Aug 19, 2016

Copy link
Copy Markdown
Contributor

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.
@winstliu

Copy link
Copy Markdown
Contributor

Can you triple-quote the extended regexes?

@winstliu
winstliu merged commit f9520c4 into atom:master Aug 19, 2016
@Alhadis

Alhadis commented Aug 19, 2016

Copy link
Copy Markdown
Contributor Author

Ah, sorry! Fixed. =)

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

@Alhadis

Alhadis commented Aug 19, 2016

Copy link
Copy Markdown
Contributor Author

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

@winstliu

Copy link
Copy Markdown
Contributor

When I have time™ I guess :P.

@Alhadis

Alhadis commented Aug 19, 2016

Copy link
Copy Markdown
Contributor Author

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