Skip to content

Commit 15eb97a

Browse files
howel52kaelzhang
authored andcommitted
fix: support file which named '....'
1 parent f716cee commit 15eb97a

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ const REGEX_SPLITALL_CRLF = /\r?\n/g
2323
// - ..
2424
// Valid:
2525
// - .foo
26-
const REGEX_TEST_INVALID_PATH = /^\.*\/|^\.+$/
26+
const REGEX_TEST_INVALID_PATH = /^\.{0,2}\/|^\.{1,2}$/
2727

2828
const REGEX_TEST_TRAILING_SLASH = /\/$/
2929

test/others.test.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,12 @@ const IGNORE_TEST_CASES = [
212212
['*.js', '!a/a.js'],
213213
'a/a.js',
214214
[false, true]
215+
],
216+
[
217+
`test: file which named '...'`,
218+
'foo',
219+
'...',
220+
[false, false]
215221
]
216222
]
217223

0 commit comments

Comments
 (0)