Fix a single-backslash attribute selector (#1428)

Closes #1423
This commit is contained in:
Natalie Weizenbaum 2021-08-11 01:52:17 +00:00 committed by GitHub
parent 5f4994e487
commit 3eca26584d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

View File

@ -1,5 +1,8 @@
## 1.37.6
* Fix a bug where quotes would be omitted for an attribute selector whose value
was a single backslash.
* Allow `if` to be used as an unquoted string.
* Properly parse backslash escapes within `url()` expressions.

View File

@ -441,7 +441,7 @@ class Parser {
var value = 0;
var first = scanner.peekChar();
if (first == null) {
return "";
scanner.error("Expected escape sequence.");
} else if (isNewline(first)) {
scanner.error("Expected escape sequence.");
} else if (isHex(first)) {