Skip to content

Commit

Permalink
Disallow whitespace after @charset, document _expression arg
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesnw committed Dec 30, 2024
1 parent ce9522b commit f0f8c7a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/src/parse/stylesheet.dart
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ abstract class StylesheetParser extends Parser {
// Handle this specially so that [atRule] always returns a non-nullable
// Statement.
if (scanner.scan('@charset')) {
whitespace(allowNewlines: true);
whitespace(allowNewlines: false);
string();
return null;
}
Expand Down Expand Up @@ -1754,7 +1754,8 @@ abstract class StylesheetParser extends Parser {
/// expression.
///
/// If [allowNewlines] is true, the indented syntax will consume newlines as
/// whitespace in positions when a statement can't end.
/// whitespace at the top level of the expression, outside of bracketed
/// subexpressions, in positions when a statement can't end.
@protected
Expression _expression(
{bool bracketList = false,
Expand Down

0 comments on commit f0f8c7a

Please sign in to comment.