Skip to content

Commit

Permalink
Fix a single-backslash attribute selector (#1428)
Browse files Browse the repository at this point in the history
Closes #1423
  • Loading branch information
nex3 committed Aug 11, 2021
1 parent 5f4994e commit 3eca265
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion lib/src/parse/parser.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down

0 comments on commit 3eca265

Please sign in to comment.