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

fix broken highlighting for properties sharing selector names #234

Merged
merged 5 commits into from
Oct 4, 2017
Merged

fix broken highlighting for properties sharing selector names #234

merged 5 commits into from
Oct 4, 2017

Conversation

dsifford
Copy link
Contributor

@dsifford dsifford commented Oct 2, 2017

Hi there,

This PR addresses a small issue in the scss grammar that caused property names that match selector names to be highlighted incorrectly.

The fix simply involved switching the order of the includes.

The bug can be reproduced using the current grammar by typing this into a scss file...

.foo {
  color: red; // no issue
  font: 'Helvetica'; // issue
  cursor: pointer; // issue
  content: ''; // issue
}

Let me know if you need anything else. Thanks so much 😄

Edit:

Fixes #226

@50Wliu
Copy link
Contributor

50Wliu commented Oct 2, 2017

Thanks so much for the PR @dsifford! Can you take a look at the failing specs? Hopefully those can be fixed easily as well.

Please tell me if you need any help running specs.

@dsifford
Copy link
Contributor Author

dsifford commented Oct 2, 2017

Yep, looking at them now. 😄

Looks like it should be fairly straightforward to fix as well.

Is there any way to run these tests locally? I plan on hammering out a ton of random bugs in various languages throughout atom as time allows so any tips you might have on my first contribution are greatly encouraged and appreciated!

@50Wliu
Copy link
Contributor

50Wliu commented Oct 2, 2017

Is there any way to run these tests locally?

atom --test spec. To only run specific tests, add an f in front of them: fdescribe, fit. You can focus multiple tests.

I plan on hammering out a ton of random bugs in various languages throughout atom as time allows

❤️ 😍 ❤️ It'll be nice having some help!

@dsifford
Copy link
Contributor Author

dsifford commented Oct 2, 2017

Aha, so the test runner is built into atom itself. How fancy!

Thanks for the help. Busy for the rest of the night, but I'll try to circle back to this tomorrow or the next day 👍

@dsifford
Copy link
Contributor Author

dsifford commented Oct 3, 2017

@50Wliu I think I got it 👍

Edit: Just realized I neglected to add tests for the changes. I'll do that tomorrow afternoon.

@dsifford
Copy link
Contributor Author

dsifford commented Oct 3, 2017

Good to go

@50Wliu
Copy link
Contributor

50Wliu commented Oct 3, 2017

Yay! Would you mind taking a look at language-less next, which has the same problem? I'll try to review this shortly.

@dsifford
Copy link
Contributor Author

dsifford commented Oct 3, 2017

gif

I'm on it!

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.

Color for 'cursor' for sass (SCSS) is wrong
2 participants