Skip to content

Commit 5865494

Browse files
ortamhegazy
authored andcommitted
Switch the pretty output to use colons to separate file:line:char so that lines are clickable in terminals (#20736)
1 parent 12d5063 commit 5865494

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/compiler/program.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -331,11 +331,11 @@ namespace ts {
331331
}
332332

333333
output += formatColorAndReset(relativeFileName, ForegroundColorEscapeSequences.Cyan);
334-
output += "(";
334+
output += ":";
335335
output += formatColorAndReset(`${ firstLine + 1 }`, ForegroundColorEscapeSequences.Yellow);
336-
output += ",";
336+
output += ":";
337337
output += formatColorAndReset(`${ firstLineChar + 1 }`, ForegroundColorEscapeSequences.Yellow);
338-
output += "): ";
338+
output += " - ";
339339
}
340340

341341
const categoryColor = getCategoryFormat(diagnostic.category);

tests/baselines/reference/prettyContextNotDebugAssertion.errors.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
tests/cases/compiler/index.ts(2,1): error TS1005: '}' expected.
1+
tests/cases/compiler/index.ts:2:1 - error TS1005: '}' expected.
22

33
2
44
  

0 commit comments

Comments
 (0)