From 0123bd0e208c1cd5353b82adc3b9b22a6f1618b7 Mon Sep 17 00:00:00 2001 From: Alex Eagle Date: Sat, 17 Jun 2017 09:20:55 -0700 Subject: [PATCH] Add missing newline in --pretty diagnostics formatter It was compensated in tsc.ts, but then other compilers are missing a newline. --- src/compiler/program.ts | 1 + src/compiler/tsc.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/compiler/program.ts b/src/compiler/program.ts index bbc0fa09780..efe0c31ef1f 100644 --- a/src/compiler/program.ts +++ b/src/compiler/program.ts @@ -332,6 +332,7 @@ namespace ts { const categoryColor = getCategoryFormat(diagnostic.category); const category = DiagnosticCategory[diagnostic.category].toLowerCase(); output += `${ formatAndReset(category, categoryColor) } TS${ diagnostic.code }: ${ flattenDiagnosticMessageText(diagnostic.messageText, sys.newLine) }`; + output += sys.newLine; } return output; } diff --git a/src/compiler/tsc.ts b/src/compiler/tsc.ts index 3b2422bfe08..c502bb916d2 100644 --- a/src/compiler/tsc.ts +++ b/src/compiler/tsc.ts @@ -61,7 +61,7 @@ namespace ts { } function reportDiagnosticWithColorAndContext(diagnostic: Diagnostic, host: FormatDiagnosticsHost): void { - sys.write(ts.formatDiagnosticsWithColorAndContext([diagnostic], host) + sys.newLine + sys.newLine); + sys.write(ts.formatDiagnosticsWithColorAndContext([diagnostic], host) + sys.newLine); } function reportWatchDiagnostic(diagnostic: Diagnostic) {