atom / language-sass

Sass package for Atom
Other
62 stars 58 forks source link

Fix incorrect tokenization of SCSS class extensions #242

Open croccifixio opened 6 years ago

croccifixio commented 6 years ago

Requirements

Description of the Change

This PR prevents extended SCSS class names with 2 or more hyphens after the name break from being tokenized as variables. Consider the following code snippet:

.block {
   &__element {}
   &--modifier {}
   &.another-block {}
   &-wrapper {}
}

__element, .another-block and -wrapper are all tokenized as punctuation.definition.entity.css.

--modifier is incorrectly tokenized as variable.scss.

Alternate Designs

None.

Benefits

Proper token colorization.

Possible Drawbacks

None that I can foresee.

Applicable Issues

241