diff --git a/src/vs/editor/common/modes/linkComputer.ts b/src/vs/editor/common/modes/linkComputer.ts index 0bb9c7684d6100acbef73fc54e47c8538d14b3b8..9d38173653648598478aee74b5f490a6e5de3b9f 100644 --- a/src/vs/editor/common/modes/linkComputer.ts +++ b/src/vs/editor/common/modes/linkComputer.ts @@ -265,7 +265,8 @@ export class LinkComputer { chClass = (linkBeginChCode === CharCode.SingleQuote || linkBeginChCode === CharCode.DoubleQuote) ? CharacterClass.None : CharacterClass.ForceTermination; break; case CharCode.Asterisk: - chClass = CharacterClass.ForceTermination; + // `*` terminates a link if the link began with `*` + chClass = (linkBeginChCode === CharCode.Asterisk) ? CharacterClass.ForceTermination : CharacterClass.None; break; default: chClass = classifier.get(chCode); diff --git a/src/vs/editor/test/common/modes/linkComputer.test.ts b/src/vs/editor/test/common/modes/linkComputer.test.ts index 52db6612ce0ec774a38eff635c4f10813b170932..ebb5df027a5f197dd7fb402466041809e31ce9ab 100644 --- a/src/vs/editor/test/common/modes/linkComputer.test.ts +++ b/src/vs/editor/test/common/modes/linkComputer.test.ts @@ -185,7 +185,7 @@ suite('Editor Modes - Link Computer', () => { ); assertLink( 'let url = `http://***/_api/web/lists/GetByTitle(\'Teambuildingaanvragen\')/items`;', - ' http://* ' + ' http://***/_api/web/lists/GetByTitle(\'Teambuildingaanvragen\')/items ' ); }); @@ -202,4 +202,11 @@ suite('Editor Modes - Link Computer', () => { ' http://[::1]:5000/connect/token ' ); }); + + test('issue #70254: bold links dont open in markdown file using editor mode with ctrl + click', () => { + assertLink( + '2. Navigate to **https://portal.azure.com**', + ' https://portal.azure.com ' + ); + }); });