дзеркало
https://github.com/l0ng-ai/openidea.git
синхронізовано 2026-11-09 11:15:40 +02:00
fix(debugger): identifier boundary check for astral letters under V8 (#1117)
Smart Step Into and Safe Delete tested the text before a match with /[\p{L}\p{N}_$]$/u, which V8 in Node 26 fails for a letter outside the BMP (a lone property class before $), so smartStep.test.ts failed. Both checks now use an alternation with the same meaning.
Цей коміт міститься в:
1 джерело
a1dd16f26d
коміт
b9f3c07f9b
2 files changed
+4
-2
No files matched your search
@@ -29,7 +29,8 @@ function callPattern(name: string, flags: string): RegExp {
|
||||
}
|
||||
|
||||
function isCallBoundary(text: string, from: number): boolean {
|
||||
return !/[\p{L}\p{N}_$]$/u.test(text.slice(Math.max(0, from - 2), from));
|
||||
// Not `[\p{L}\p{N}_$]$`: V8 (Node 26) misses an astral letter with a lone class before `$`.
|
||||
return !/(?:\p{L}|\p{N}|[_$])$/u.test(text.slice(Math.max(0, from - 2), from));
|
||||
}
|
||||
|
||||
function identifierEnd(text: string, from: number): number {
|
||||
|
||||
Reference in new issue
Заблокувати користувача