Skip to content

Commit

Permalink
fix(diagnostics): use formatHost.getNewLine() instead of \n
Browse files Browse the repository at this point in the history
- since new lines are host OS specific
  • Loading branch information
agilgur5 committed Aug 30, 2022
1 parent 2d3cfe3 commit 7072019
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/diagnostics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export function convertDiagnostic(type: string, data: tsTypes.Diagnostic[]): IDi
return data.map((diagnostic) =>
{
const entry: IDiagnostics = {
flatMessage: tsModule.flattenDiagnosticMessageText(diagnostic.messageText, "\n"),
flatMessage: tsModule.flattenDiagnosticMessageText(diagnostic.messageText, formatHost.getNewLine()),
formatted: tsModule.formatDiagnosticsWithColorAndContext(data, formatHost),
category: diagnostic.category,
code: diagnostic.code,
Expand Down

0 comments on commit 7072019

Please sign in to comment.