Skip to content

Commit

Permalink
Change regexp to match Windows too
Browse files Browse the repository at this point in the history
Since the split uses `\n` leaving an `\r` on Windows, CRLF endings do not seem to be properly matched by `$`.
  • Loading branch information
Nixinova committed Mar 8, 2024
1 parent 3ddd8dc commit f68f376
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/helpers/parse-gitattributes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export default function parseAttributes(content: string, folderRoot: string = '.
const output: ParsedGitattributes = [];

for (const rawLine of content.split('\n')) {
const line = rawLine.replace(/#.*$/, '').trim();
const line = rawLine.replace(/#.*/, '').trim();
if (!line) continue;

const parts = line.split(/\s+/g);
Expand Down

0 comments on commit f68f376

Please sign in to comment.