mirror of
https://github.com/danog/dart-sass.git
synced 2024-11-27 12:44:42 +01:00
Fix String.asInterpolation().
We were checking if its contents was an Interpolation, when we should have been checking for an Expression.
This commit is contained in:
parent
f5b04abd8b
commit
a7c6a1ad5b
@ -9,6 +9,9 @@
|
||||
|
||||
* Fix a few more small `@extend` bugs.
|
||||
|
||||
* Fix a bug where interpolation in a quoted string was being dropped in some
|
||||
circumstances.
|
||||
|
||||
## 1.0.0-alpha.6
|
||||
|
||||
* Allow `var()` to be passed to `rgb()`, `rgba()`, `hsl()`, and `hsla()`.
|
||||
|
@ -55,8 +55,9 @@ class StringExpression implements Expression {
|
||||
var buffer = new InterpolationBuffer();
|
||||
if (quote != null) buffer.writeCharCode(quote);
|
||||
for (var value in text.contents) {
|
||||
if (value is Interpolation) {
|
||||
buffer.addInterpolation(value);
|
||||
assert(value is Expression || value is String);
|
||||
if (value is Expression) {
|
||||
buffer.add(value);
|
||||
} else if (value is String) {
|
||||
for (var i = 0; i < value.length; i++) {
|
||||
var codeUnit = value.codeUnitAt(i);
|
||||
|
Loading…
Reference in New Issue
Block a user