Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix toString for namespaced variable #1358

Merged
merged 1 commit into from Jun 14, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Expand Up @@ -3,6 +3,9 @@
* Fix a couple bugs that could prevent some members from being found in certain
files that use a mix of imports and the module system.

* Fix incorrect recommendation for migrating division expressions that reference
namespaced variables.

## 1.34.1

* Fix a bug where `--update` would always compile any file that depends on a
Expand Down
7 changes: 1 addition & 6 deletions lib/src/ast/sass/expression/variable.dart
Expand Up @@ -23,10 +23,5 @@ class VariableExpression implements Expression {
T accept<T>(ExpressionVisitor<T> visitor) =>
visitor.visitVariableExpression(this);

String toString() {
var buffer = StringBuffer("\$");
if (namespace != null) buffer.write("$namespace.");
buffer.write(name);
return buffer.toString();
}
String toString() => namespace == null ? '\$$name' : '$namespace.\$$name';
}