micromatch / micromatch/picomatch
There are no escape parentheses,Incorrectly matches `新建文件夹 (2)` against `新建文件夹 (2)`
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 1.3k
- Forks
- 135
- Avg merge
- 23h 38m
- Merged PRs (30d)
- 7
Description
picomatch@^2.2.1
Code:
const picomatch = require('picomatch');
const file1 = 'C:/Users/111/Desktop/新建文件夹 (2)/QQ图片20210204193714.jpg';
const file2 = '新建文件夹()';
const a= picomatch.makeRe(file1,{
dot: false,
matchBase: false,
nobrace: false,
nocase: false,
noext: false,
noglobstar: false,
posix: true,
strictSlashes: false
})
const a2= picomatch.makeRe(file2,{
dot: false,
matchBase: false,
nobrace: false,
nocase: false,
noext: false,
noglobstar: false,
posix: true,
strictSlashes: false
})
a1.test(file1);//false
a2.test(file2);// /^(?:新建文件夹())$/ false
Expected result: true
Actual result: false
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the provided picomatch.makeRe reproduction using the Chinese path and parentheses, then inspect how the pattern is converted into a regular expression. Verify the behavior for both examples and add regression coverage if the repository’s existing test structure supports it; done means the reported path matches as expected without breaking glob syntax.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100