Skip to content

Commit 6b1780d

Browse files
alan-agius4AndrewKushnir
authored andcommitted
build: avoid writing \r in windows (angular#26888)
In windows when using readFile `\n` are replaced with `\r\n` which causes issues when comparing golden files PR Close angular#26888
1 parent 7865abf commit 6b1780d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/ts-api-guardian/lib/serializer.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,7 @@ const memberDeclarationOrder: {[key: number]: number} = {
381381
};
382382

383383
function stripEmptyLines(text: string): string {
384-
return text.split('\n').filter(x => !!x.length).join('\n');
384+
return text.split(/\r?\n/).filter(x => !!x.length).join('\n');
385385
}
386386

387387
/**

0 commit comments

Comments
 (0)