Skip to content

Commit ed83f1f

Browse files
committed
fix(at signs): tighter regex (with lookbehind)
1 parent e91b6b6 commit ed83f1f

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

‎package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@
109109
"jsonpath"
110110
],
111111
"browserslist": [
112-
"last 2 versions, not IE 10, not IE 11, not ie_mob 10, not ie_mob 11, not op_mini all, not bb 7, not bb 10"
112+
"last 2 versions, not IE 10, not IE 11, not ie_mob 10, not ie_mob 11, not op_mini all, not bb 7, not bb 10, not kaios 2.5"
113113
],
114114
"c8": {
115115
"reporter": [

‎src/jsonpath.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1052,7 +1052,7 @@ class JSONPathClass {
10521052
// regex literals (a `/` where an operand is expected,
10531053
// as opposed to division) intact
10541054
.replaceAll(
1055-
/('(?:\\.|[^'\\])*'|"(?:\\.|[^"\\])*"|(?:^|[\(,=:\[!\|?\{\};+\-*%<>~^]|&)\s*\/(?:\\.|\[(?:\\.|[^\]\\])*\]|[^\/\\\[])+\/[dgimsuvy]*)|@(?![\w$])/gv,
1055+
/('(?:\\.|[^'\\])*'|"(?:\\.|[^"\\])*"|(?<=(?:^|[\(,=:\[!\|?\{\};+\-*%<>~^]|&)\s*)\/(?:\\.|\[(?:\\.|[^\]\\])*\]|[^\/\\\[])+\/[dgimsuvy]*)|@(?![\w$])/gv,
10561056
(_, literal) => literal ?? '_$_v'
10571057
);
10581058
if (containsPath) {

0 commit comments

Comments
 (0)