Skip to content

Commit 820b2f6

Browse files
authored
microsoft#70254 - Set astrisk as a delimiter for URIs (microsoft#82816)
microsoft#70254 - Set astrisk as a delimiter for URIs
2 parents 1444e61 + b5652be commit 820b2f6

2 files changed

Lines changed: 11 additions & 0 deletions

File tree

src/vs/editor/common/modes/linkComputer.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,10 @@ export class LinkComputer {
264264
case CharCode.BackTick:
265265
chClass = (linkBeginChCode === CharCode.SingleQuote || linkBeginChCode === CharCode.DoubleQuote) ? CharacterClass.None : CharacterClass.ForceTermination;
266266
break;
267+
case CharCode.Asterisk:
268+
// `*` terminates a link if the link began with `*`
269+
chClass = (linkBeginChCode === CharCode.Asterisk) ? CharacterClass.ForceTermination : CharacterClass.None;
270+
break;
267271
default:
268272
chClass = classifier.get(chCode);
269273
}

src/vs/editor/test/common/modes/linkComputer.test.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,4 +202,11 @@ suite('Editor Modes - Link Computer', () => {
202202
' http://[::1]:5000/connect/token '
203203
);
204204
});
205+
206+
test('issue #70254: bold links dont open in markdown file using editor mode with ctrl + click', () => {
207+
assertLink(
208+
'2. Navigate to **https://portal.azure.com**',
209+
' https://portal.azure.com '
210+
);
211+
});
205212
});

0 commit comments

Comments
 (0)