Test a unit-parsing edge case on Dart Sass.

This commit is contained in:
Natalie Weizenbaum 2017-01-14 17:06:05 -08:00
parent c415dd068d
commit 6bc4fb1c34
2 changed files with 4 additions and 2 deletions

View File

@ -16,6 +16,8 @@
* Fix `invert()` with a `$weight` parameter.
* Fix a unit-parsing edge-cases.
## 1.0.0-alpha.8
* Add the `content-exists()` function.

View File

@ -108,9 +108,9 @@ abstract class Parser {
if (next == null) {
break;
} else if (unit && next == $dash) {
// Disallow `-` followed by a digit in units.
// Disallow `-` followed by a dot or a digit digit in units.
var second = scanner.peekChar(1);
if (second != null && isDigit(second)) break;
if (second != null && (second == $dot || isDigit(second))) break;
text.writeCharCode(scanner.readChar());
} else if (isName(next)) {
text.writeCharCode(scanner.readChar());