Commit f2fe87d
committed
Address PR #113 round 5: remove invalid 'e' flag, clarify parser comments
src/regex.ts — extractRegexToken():
- Remove 'e' from the allowed flag set: [gimsuydev]* -> [gimsuydv]*
'e' is not a valid JavaScript RegExp flag; its presence would cause
/pattern/e to be tokenised as a regex and then fail compilation,
instead of being passed through unchanged as a plain query token.
src/regex.ts — splitTopLevelAlternation():
- Clarify truncated inline comments:
depth: 'tracks unescaped ( nesting'
→ 'tracks unescaped \"(\" nesting depth outside character classes'
inClass: 'tracks [...]'
→ 'tracks whether we are currently inside a character class [...]'
src/regex.test.ts:
- isRegexQuery('/pattern/e') → false (regression test)
- buildApiQuery('/pattern/e') → passthrough, regexFilter null1 parent 70e4f33 commit f2fe87d
2 files changed
Lines changed: 15 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
36 | 40 | | |
37 | 41 | | |
38 | 42 | | |
| |||
51 | 55 | | |
52 | 56 | | |
53 | 57 | | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
54 | 64 | | |
55 | 65 | | |
56 | 66 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
93 | | - | |
| 93 | + | |
94 | 94 | | |
95 | 95 | | |
96 | | - | |
| 96 | + | |
| 97 | + | |
97 | 98 | | |
98 | 99 | | |
99 | 100 | | |
| |||
144 | 145 | | |
145 | 146 | | |
146 | 147 | | |
147 | | - | |
148 | | - | |
| 148 | + | |
| 149 | + | |
149 | 150 | | |
150 | 151 | | |
151 | 152 | | |
| |||
0 commit comments