Skip to content

Commit

Permalink
Preserve underscores in VariableExpression.toString()
Browse files Browse the repository at this point in the history
Closes #2180
  • Loading branch information
nex3 committed Feb 22, 2024
1 parent 1b4d703 commit 119d8a7
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 4 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## 1.71.2

* When printing suggestions for variables, use underscores in variable names
when the original usage used underscores.

## 1.71.1

### Command-Line Interface
Expand Down
2 changes: 1 addition & 1 deletion lib/src/ast/sass/expression/variable.dart
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,5 @@ final class VariableExpression implements Expression, SassReference {
T accept<T>(ExpressionVisitor<T> visitor) =>
visitor.visitVariableExpression(this);

String toString() => namespace == null ? '\$$name' : '$namespace.\$$name';
String toString() => span.text;
}
4 changes: 4 additions & 0 deletions pkg/sass_api/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 9.4.2

* No user-visible changes.

## 9.4.1

* No user-visible changes.
Expand Down
4 changes: 2 additions & 2 deletions pkg/sass_api/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ name: sass_api
# Note: Every time we add a new Sass AST node, we need to bump the *major*
# version because it's a breaking change for anyone who's implementing the
# visitor interface(s).
version: 9.4.1
version: 9.4.2
description: Additional APIs for Dart Sass.
homepage: https://github.com/sass/dart-sass

environment:
sdk: ">=3.0.0 <4.0.0"

dependencies:
sass: 1.71.1
sass: 1.71.2

dev_dependencies:
dartdoc: ^6.0.0
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.71.1
version: 1.71.2
description: A Sass implementation in Dart.
homepage: https://github.com/sass/dart-sass

Expand Down

0 comments on commit 119d8a7

Please sign in to comment.