Skip to content

Commit 0344842

Browse files
authored
Fix span for not operations (#1797)
1 parent fb107bd commit 0344842

File tree

5 files changed

+15
-5
lines changed

5 files changed

+15
-5
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 1.54.9
2+
3+
* Fix an incorrect span in certain `@media` query deprecation warnings.
4+
15
## 1.54.8
26

37
* No user-visible changes.

lib/src/parse/stylesheet.dart

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2713,8 +2713,9 @@ abstract class StylesheetParser extends Parser {
27132713
invocation, identifier.span.expand(invocation.span));
27142714
} else if (plain == "not") {
27152715
whitespace();
2716-
return UnaryOperationExpression(
2717-
UnaryOperator.not, _singleExpression(), identifier.span);
2716+
var expression = _singleExpression();
2717+
return UnaryOperationExpression(UnaryOperator.not, expression,
2718+
identifier.span.expand(expression.span));
27182719
}
27192720

27202721
lower = plain.toLowerCase();

pkg/sass_api/CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
## 3.0.4
2+
3+
* `UnaryOperationExpression`s with operator `not` now include a correct span,
4+
covering the expression itself instead of just the operator.
5+
16
## 3.0.3
27

38
* No user-visible changes.

pkg/sass_api/pubspec.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@ name: sass_api
22
# Note: Every time we add a new Sass AST node, we need to bump the *major*
33
# version because it's a breaking change for anyone who's implementing the
44
# visitor interface(s).
5-
version: 3.0.3
5+
version: 3.0.4
66
description: Additional APIs for Dart Sass.
77
homepage: https://github.com/sass/dart-sass
88

99
environment:
1010
sdk: ">=2.17.0 <3.0.0"
1111

1212
dependencies:
13-
sass: 1.54.8
13+
sass: 1.54.9
1414

1515
dev_dependencies:
1616
dartdoc: ^5.0.0

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: sass
2-
version: 1.54.8
2+
version: 1.54.9
33
description: A Sass implementation in Dart.
44
homepage: https://github.com/sass/dart-sass
55

0 commit comments

Comments
 (0)