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

Fix tag names interfering with property names #243

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions grammars/scss.cson
Original file line number Diff line number Diff line change
Expand Up @@ -973,8 +973,13 @@
'properties':
'patterns': [
{
'begin': '(?<![-a-z])(?=[-a-z])'
'end': '$|(?![-a-z])'
# NOTE: This is different from language-css's implementation.
# While both CSS and SCSS allow the colon to be on a different line,
# we are limited to matching the colon on the same line in SCSS
# so that property names that are also tag names are matched properly.
# https://github.com/atom/language-sass/issues/226
'begin': '(?<![-a-z])(?!--)(?=[-a-z]+\\s*:)'
'end': '(?=\\s*:)'
'name': 'meta.property-name.scss'
'patterns': [
{
Expand Down Expand Up @@ -1020,10 +1025,10 @@
'include': '#flow_control'
}
{
'include': '#rules'
'include': '#properties'
}
{
'include': '#properties'
'include': '#rules'
}
{
'include': '$self'
Expand Down
Loading