Fix regex-matching in JSONPath

This commit is contained in:
Raymond Hill 2025-10-23 09:13:58 -04:00
parent 01427bd754
commit 8491e9c476
No known key found for this signature in database
GPG key ID: F5630CAE62A14316

View file

@ -416,9 +416,9 @@ export class JSONPath {
break;
}
if ( c === 0x5C /* \ */ && (end+1) < len ) {
parts.push(query.slice(beg, end));
const d = query.charCodeAt(end+1);
if ( d === targetCharCode || d === 0x5C ) {
if ( d === targetCharCode ) {
parts.push(query.slice(beg, end));
end += 1;
beg = end;
}