Skip to content

Commit

Permalink
Make a predule for @else optional (fixes #46)
Browse files Browse the repository at this point in the history
  • Loading branch information
lahmatiy committed Jan 29, 2023
1 parent 52dc345 commit 02f7cc1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/syntax-extension/sass/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export default function sass(syntaxConfig) {
prelude: '<any-value>'
};
syntaxConfig.atrules.else = {
prelude: '<any-value>'
prelude: '<any-value>?'
};
syntaxConfig.atrules.error = {
prelude: '<any-value>'
Expand Down
4 changes: 3 additions & 1 deletion test/preprocessors.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,13 +77,15 @@ const sassTests = function(tr) {
tr.ok('@content xxx');
tr.ok('@debug xxx');
tr.ok('@each xxx');
tr.ok('@else xxx');
tr.ok('@error xxx');
tr.ok('@extend xxx');
tr.ok('@for xxx');
tr.ok('@forward xxx');
tr.ok('@function xxx');
tr.ok('@if xxx');
tr.ok('@else xxx');
tr.ok('@else {}');
tr.ok('@else if {}');
tr.ok('@import "theme.css";');
tr.ok('@import "http://fonts.googleapis.com/css?family=Droid+Sans";');
tr.ok('@import url(theme);');
Expand Down

0 comments on commit 02f7cc1

Please sign in to comment.