Skip to content

Commit f5f0b2b

Browse files
committed
Support ' surrounding validated links
Fixes microsoft#134462
1 parent 2866063 commit f5f0b2b

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/vs/workbench/contrib/terminal/browser/links/terminalValidatedLocalLinkProvider.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ export const winLocalLinkClause = '((' + winPathPrefix + '|(' + winExcludedPathC
3434
/** As xterm reads from DOM, space in that case is nonbreaking char ASCII code - 160,
3535
replacing space with nonBreakningSpace or space ASCII code - 32. */
3636
export const lineAndColumnClause = [
37-
'((\\S*)", line ((\\d+)( column (\\d+))?))', // "(file path)", line 45 [see #40468]
38-
'((\\S*)",((\\d+)(:(\\d+))?))', // "(file path)",45 [see #78205]
37+
'((\\S*)[\'"], line ((\\d+)( column (\\d+))?))', // "(file path)", line 45 [see #40468]
38+
'((\\S*)[\'"],((\\d+)(:(\\d+))?))', // "(file path)",45 [see #78205]
3939
'((\\S*) on line ((\\d+)(, column (\\d+))?))', // (file path) on line 8, column 13
4040
'((\\S*):line ((\\d+)(, column (\\d+))?))', // (file path):line 8, column 13
4141
'(([^\\s\\(\\)]*)(\\s?[\\(\\[](\\d+)(,\\s?(\\d+))?)[\\)\\]])', // (file path)(45), (file path) (45), (file path)(45,18), (file path) (45,18), (file path)(45, 18), (file path) (45, 18), also with []

src/vs/workbench/contrib/terminal/test/browser/links/terminalValidatedLocalLinkProvider.test.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,8 @@ const supportedLinkFormats: LinkFormatInfo[] = [
7171
{ urlFormat: '{0} [{1},{2}]', line: '5', column: '3' },
7272
{ urlFormat: '{0}[{1}, {2}]', line: '5', column: '3' },
7373
{ urlFormat: '{0} [{1}, {2}]', line: '5', column: '3' },
74-
{ urlFormat: '{0}",{1}', line: '5' }
74+
{ urlFormat: '{0}",{1}', line: '5' },
75+
{ urlFormat: '{0}\',{1}', line: '5' }
7576
];
7677

7778
suite('Workbench - TerminalValidatedLocalLinkProvider', () => {

0 commit comments

Comments
 (0)