Skip to content

Commit 48e2d0c

Browse files
authored
Preserve underscores in VariableExpression.toString() (#2185)
Closes #2180
1 parent 6e2d637 commit 48e2d0c

File tree

4 files changed

+10
-3
lines changed

4 files changed

+10
-3
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66
* Allow the Node.js `pkg:` importer to load Sass stylesheets for `package.json`
77
`exports` field entries without extensions.
88

9+
* When printing suggestions for variables, use underscores in variable names
10+
when the original usage used underscores.
11+
912
## 1.71.1
1013

1114
### Command-Line Interface

lib/src/ast/sass/expression/variable.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,5 +35,5 @@ final class VariableExpression implements Expression, SassReference {
3535
T accept<T>(ExpressionVisitor<T> visitor) =>
3636
visitor.visitVariableExpression(this);
3737

38-
String toString() => namespace == null ? '\$$name' : '$namespace.\$$name';
38+
String toString() => span.text;
3939
}

pkg/sass_api/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 9.4.2
2+
3+
* No user-visible changes.
4+
15
## 9.4.1
26

37
* 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: 9.4.1
5+
version: 9.4.2
66
description: Additional APIs for Dart Sass.
77
homepage: https://github.com/sass/dart-sass
88

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

1212
dependencies:
13-
sass: 1.71.1
13+
sass: 1.71.2
1414

1515
dev_dependencies:
1616
dartdoc: ^6.0.0

0 commit comments

Comments
 (0)