Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 1.93.3-dev

* Fix the span reported for standalone `%` expressions followed by whitespace.

## 1.93.2

* No user-visible changes.
Expand Down
3 changes: 2 additions & 1 deletion lib/src/parse/stylesheet.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2128,11 +2128,12 @@ abstract class StylesheetParser extends Parser {
length: operator.operator.length,
);
}
var operatorEnd = scanner.position;
whitespace(consumeNewlines: true);

if (operator == BinaryOperator.modulo && !_lookingAtExpression()) {
addSingleExpression(StringExpression.plain(
'%', scanner.spanFromPosition(scanner.position - 1)));
'%', scanner.spanFromPosition(operatorEnd - 1, operatorEnd)));
} else {
operators.add(operator);
operands.add(singleExpression);
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: sass
version: 1.93.2
version: 1.93.3-dev
description: A Sass implementation in Dart.
homepage: https://github.com/sass/dart-sass

Expand Down
Loading