fix(core): handle line endings in ignore file parsing (#23895)

Co-authored-by: cynthialong0-0 <82900738+cynthialong0-0@users.noreply.github.com>
This commit is contained in:
xoma-zver
2026-04-22 21:09:36 +03:00
committed by GitHub
parent 0758a5eb28
commit 1c43deee07
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -52,7 +52,7 @@ export class GitIgnoreParser implements GitIgnoreFilter {
.split(path.sep)
.join(path.posix.sep);
const rawPatterns = content.split('\n');
const rawPatterns = content.split(/\r\n|\n|\r/);
return ignore().add(this.processPatterns(rawPatterns, relativeBaseDir));
}
+1 -1
View File
@@ -70,7 +70,7 @@ export class IgnoreFileParser implements IgnoreFileFilter {
debugLogger.debug(`Loading ignore patterns from: ${patternsFilePath}`);
return (content ?? '')
.split('\n')
.split(/\r\n|\n|\r/)
.map((p) => p.trim())
.filter((p) => p !== '' && !p.startsWith('#'));
}