Skip to content

Commit

Permalink
Improve the error message for invalid default namespaces
Browse files Browse the repository at this point in the history
  • Loading branch information
stof committed Sep 28, 2021
1 parent ba38c09 commit a32fa3c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/src/parse/stylesheet.dart
Expand Up @@ -1398,7 +1398,7 @@ abstract class StylesheetParser extends Parser {
try {
return Parser.parseIdentifier(namespace, logger: logger);
} on SassFormatException {
error('Invalid Sass identifier "$namespace"', scanner.spanFrom(start));
error('The default namespace "$namespace" is not a valid Sass identifier.\n\nRecommendation: add an "as" clause to define an explicit namespace.', scanner.spanFrom(start));
}
}

Expand Down

0 comments on commit a32fa3c

Please sign in to comment.