Allow #{...}--1. (#62)

This commit is contained in:
Natalie Weizenbaum 2016-12-09 17:22:53 -08:00 committed by GitHub
parent 779edfad3b
commit 65acb8b184
2 changed files with 8 additions and 2 deletions

View File

@ -5,6 +5,8 @@
* Fix a bug with `@extend` superselector calculations.
* Fix some cases where `#{...}--` would fail to parse in selectors.
* Allow a single number to be passed to `saturate()` for use in filter contexts.
* Fix a bug where `**/` would fail to close a loud comment.

View File

@ -2013,7 +2013,9 @@ abstract class StylesheetParser extends Parser {
case $hash:
if (scanner.peekChar(1) == $lbrace) {
buffer.add(singleInterpolation());
// Add a full interpolated identifier to handle cases like
// "#{...}--1", since "--1" isn't a valid identifier on its own.
buffer.addInterpolation(_interpolatedIdentifier());
} else {
buffer.writeCharCode(scanner.readChar());
}
@ -2103,7 +2105,9 @@ abstract class StylesheetParser extends Parser {
case $hash:
if (scanner.peekChar(1) == $lbrace) {
buffer.add(singleInterpolation());
// Add a full interpolated identifier to handle cases like
// "#{...}--1", since "--1" isn't a valid identifier on its own.
buffer.addInterpolation(_interpolatedIdentifier());
} else {
buffer.writeCharCode(scanner.readChar());
}