Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/index.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -258,9 +258,9 @@ describe('Package', () => {
describe('posix', () => {
describe('.escapePath', () => {
it('should return escaped path', () => {
const expected = '/directory/\\*\\*/\\*';
const expected = '/directory\\, /\\*\\*/\\*';

const actual = fg.posix.escapePath('/directory/*\\*/*');
const actual = fg.posix.escapePath('/directory, /*\\*/*');

assert.strictEqual(actual, expected);
});
Expand Down
2 changes: 1 addition & 1 deletion src/utils/path.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const LEADING_DOT_SEGMENT_CHARACTERS_COUNT = 2; // ./ or .\\
* Posix: ()*?[]{|}, !+@ before (, ! at the beginning, \\ before non-special characters.
* Windows: (){}[], !+@ before (, ! at the beginning.
*/
const POSIX_UNESCAPED_GLOB_SYMBOLS_RE = /(?<escape>\\?)(?<symbols>[()*?[\]{|}]|^!|[!+@](?=\()|\\(?![!()*+?@[\]{|}]))/g;
const POSIX_UNESCAPED_GLOB_SYMBOLS_RE = /(?<escape>\\?)(?<symbols>[()*,?[\]{|}]|^!|[!+@](?=\()|\\(?![!()*+,?@[\]{|}]))/g;
const WINDOWS_UNESCAPED_GLOB_SYMBOLS_RE = /(?<escape>\\?)(?<symbols>[()[\]{}]|^!|[!+@](?=\())/g;
/**
* The device path (\\.\ or \\?\).
Expand Down