Skip to content

Commit 0e6da17

Browse files
authored
Merge pull request microsoft#181820 from microsoft/tyriar/180398
Support links with spaces in cmd prompt paths
2 parents c1eab19 + 82338db commit 0e6da17

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

src/vs/workbench/contrib/terminalContrib/links/browser/terminalLocalLinkDetector.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ const fallbackMatchers: RegExp[] = [
4949
// C:\foo/bar baz:339: error ...
5050
// C:\foo/bar baz:339:12: error ... [#178584, Clang]
5151
/^(?<link>(?<path>.+):(?<line>\d+)(?::(?<col>\d+))?) ?:/,
52+
// Cmd prompt
53+
/^(?<link>(?<path>.+))>/,
5254
// The whole line is the path
5355
/^ *(?<link>(?<path>.+))/
5456
];

src/vs/workbench/contrib/terminalContrib/links/test/browser/terminalLocalLinkDetector.test.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,8 @@ const supportedFallbackLinkFormats: LinkFormatInfo[] = [
135135
{ urlFormat: '{0}:{1}:{2} :', line: '5', column: '3', linkCellEndOffset: -2 },
136136
{ urlFormat: '{0}:{1}:', line: '5', linkCellEndOffset: -1 },
137137
{ urlFormat: '{0}:{1}:{2}:', line: '5', column: '3', linkCellEndOffset: -1 },
138+
// Cmd prompt
139+
{ urlFormat: '{0}>', linkCellEndOffset: -1 },
138140
// The whole line is the path
139141
{ urlFormat: '{0}' },
140142
];

0 commit comments

Comments
 (0)