Commit 8f5ecc0
fix: treat
In the fast-path regex builder, `**.ext` patterns (e.g. `**.js`,
`**.thing.js`) were reduced to a bare `**` and expanded to a globstar,
so they incorrectly matched across path separators — `**.thing.js`
matched `somepath/test.thing.js`.
Per Bash semantics, `**` is only a globstar when it is the sole content
of a path segment; adjacent to other characters it behaves as a single
star. Bail out of the fast path for this shape and let the full parser
produce the correct single-star regex (as it already did for patterns
the fast path skipped, e.g. `**.dash-thing.js`).
Closes #99** adjacent to a literal as a single star (#99)1 parent 838c9d7 commit 8f5ecc0
2 files changed
Lines changed: 17 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1408 | 1408 | | |
1409 | 1409 | | |
1410 | 1410 | | |
| 1411 | + | |
| 1412 | + | |
| 1413 | + | |
| 1414 | + | |
| 1415 | + | |
1411 | 1416 | | |
1412 | 1417 | | |
1413 | 1418 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
75 | 87 | | |
0 commit comments