未验证 提交 b5652be1 编写于 作者: A Alex Dima

Have `*` terminate a link only when the character before the link is also a `*`

上级 ed74af85
...@@ -265,7 +265,8 @@ export class LinkComputer { ...@@ -265,7 +265,8 @@ export class LinkComputer {
chClass = (linkBeginChCode === CharCode.SingleQuote || linkBeginChCode === CharCode.DoubleQuote) ? CharacterClass.None : CharacterClass.ForceTermination; chClass = (linkBeginChCode === CharCode.SingleQuote || linkBeginChCode === CharCode.DoubleQuote) ? CharacterClass.None : CharacterClass.ForceTermination;
break; break;
case CharCode.Asterisk: case CharCode.Asterisk:
chClass = CharacterClass.ForceTermination; // `*` terminates a link if the link began with `*`
chClass = (linkBeginChCode === CharCode.Asterisk) ? CharacterClass.ForceTermination : CharacterClass.None;
break; break;
default: default:
chClass = classifier.get(chCode); chClass = classifier.get(chCode);
......
...@@ -185,7 +185,7 @@ suite('Editor Modes - Link Computer', () => { ...@@ -185,7 +185,7 @@ suite('Editor Modes - Link Computer', () => {
); );
assertLink( assertLink(
'let url = `http://***/_api/web/lists/GetByTitle(\'Teambuildingaanvragen\')/items`;', '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', () => { ...@@ -202,4 +202,11 @@ suite('Editor Modes - Link Computer', () => {
' http://[::1]:5000/connect/token ' ' 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 '
);
});
}); });
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册