mirror of
https://github.com/danog/dart-sass.git
synced 2024-11-30 04:39:03 +01:00
Fix escaped backslash crash (#1870)
* Fix escaped backslash crash Fixes #1855. * Code review
This commit is contained in:
parent
0248608c44
commit
00069241b9
@ -14,6 +14,8 @@
|
|||||||
* Produce a better error message for a nested property whose name starts with
|
* Produce a better error message for a nested property whose name starts with
|
||||||
`--`.
|
`--`.
|
||||||
|
|
||||||
|
* Fix a crash when a selector ends in an escaped backslash.
|
||||||
|
|
||||||
## 1.57.1
|
## 1.57.1
|
||||||
|
|
||||||
* No user-visible changes.
|
* No user-visible changes.
|
||||||
|
@ -114,7 +114,7 @@ int? _lastNonWhitespace(String string, {bool excludeEscape = false}) {
|
|||||||
if (!isWhitespace(codeUnit)) {
|
if (!isWhitespace(codeUnit)) {
|
||||||
if (excludeEscape &&
|
if (excludeEscape &&
|
||||||
i != 0 &&
|
i != 0 &&
|
||||||
i != string.length &&
|
i != string.length - 1 &&
|
||||||
codeUnit == $backslash) {
|
codeUnit == $backslash) {
|
||||||
return i + 1;
|
return i + 1;
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user