build: avoid writing `\r` in windows (#26888)

In windows when using readFile `\n` are replaced with `\r\n` which causes issues when comparing golden files

PR Close #26888
This commit is contained in:
Alan Agius 2018-11-03 10:56:52 +01:00 committed by Andrew Kushnir
parent 7865abf667
commit 6b1780d77e
1 changed files with 1 additions and 1 deletions

View File

@ -381,7 +381,7 @@ const memberDeclarationOrder: {[key: number]: number} = {
};
function stripEmptyLines(text: string): string {
return text.split('\n').filter(x => !!x.length).join('\n');
return text.split(/\r?\n/).filter(x => !!x.length).join('\n');
}
/**