From aa443b9b3ece36ec7bb769326c20da3eebd6416b Mon Sep 17 00:00:00 2001 From: Koen Lageveen Date: Sat, 8 Dec 2018 23:34:45 +0100 Subject: [PATCH] fix #52 { } and ; are invalid in sass --- Syntaxes/Sass.sublime-syntax | 4 ++++ Tests/syntax_test_sass.sass | 11 +++++++++++ 2 files changed, 15 insertions(+) diff --git a/Syntaxes/Sass.sublime-syntax b/Syntaxes/Sass.sublime-syntax index 5cbf28c9..02b52cd1 100644 --- a/Syntaxes/Sass.sublime-syntax +++ b/Syntaxes/Sass.sublime-syntax @@ -155,6 +155,8 @@ variables: contexts: main: + - match: '\{|\}|;' + scope: invalid.illegal.sass - include: frontmatter - include: comment-block - include: comment-line @@ -602,6 +604,8 @@ contexts: pop: true property-values: + - match: ';' + scope: invalid.illegal.sass - match: '\!\s*important' scope: keyword.other.important.css captures: diff --git a/Tests/syntax_test_sass.sass b/Tests/syntax_test_sass.sass index 268ef3ce..e91e2779 100644 --- a/Tests/syntax_test_sass.sass +++ b/Tests/syntax_test_sass.sass @@ -11,6 +11,17 @@ This is nested beneath the comment as well, so it also won't appear +/* +Sass indented syntax doesn't use { } or ; +*/ + +div { +// ^ invalid.illegal.sass + color: blue; +// ^ invalid.illegal.sass +} +// <- invalid.illegal.sass + /* Property syntax with the colon before the property name */