Skip to content

Commit 02f7cc1

Browse files
committed
Make a predule for @else optional (fixes #46)
1 parent 52dc345 commit 02f7cc1

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

lib/syntax-extension/sass/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export default function sass(syntaxConfig) {
3535
prelude: '<any-value>'
3636
};
3737
syntaxConfig.atrules.else = {
38-
prelude: '<any-value>'
38+
prelude: '<any-value>?'
3939
};
4040
syntaxConfig.atrules.error = {
4141
prelude: '<any-value>'

test/preprocessors.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,13 +77,15 @@ const sassTests = function(tr) {
7777
tr.ok('@content xxx');
7878
tr.ok('@debug xxx');
7979
tr.ok('@each xxx');
80-
tr.ok('@else xxx');
8180
tr.ok('@error xxx');
8281
tr.ok('@extend xxx');
8382
tr.ok('@for xxx');
8483
tr.ok('@forward xxx');
8584
tr.ok('@function xxx');
8685
tr.ok('@if xxx');
86+
tr.ok('@else xxx');
87+
tr.ok('@else {}');
88+
tr.ok('@else if {}');
8789
tr.ok('@import "theme.css";');
8890
tr.ok('@import "http://fonts.googleapis.com/css?family=Droid+Sans";');
8991
tr.ok('@import url(theme);');

0 commit comments

Comments
 (0)