mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-24 18:49:00 +01:00
@@ -89,6 +89,7 @@ const smartPasteLineRegexes = [
|
||||
{ regex: /\$\$[\s\S]*?\$\$/gm }, // In a fenced math block
|
||||
{ regex: /`[^`]*`/g }, // In inline code
|
||||
{ regex: /\$[^$]*\$/g }, // In inline math
|
||||
{ regex: /<[^<>\s]*>/g }, // Autolink
|
||||
{ regex: /^[ ]{0,3}\[\w+\]:\s.*$/g, isWholeLine: true }, // Block link definition (needed as tokens are not generated for these)
|
||||
];
|
||||
|
||||
|
||||
@@ -300,5 +300,11 @@ suite('createEditAddingLinksForUriList', () => {
|
||||
await shouldInsertMarkdownLinkByDefault(createNewMarkdownEngine(), makeTestDoc(' \r\n\r\n'), PasteUrlAsMarkdownLink.SmartWithSelection, [new vscode.Range(0, 0, 0, 7)], noopToken),
|
||||
false);
|
||||
});
|
||||
|
||||
test('Smart should be disabled inside of autolinks', async () => {
|
||||
assert.strictEqual(
|
||||
await shouldInsertMarkdownLinkByDefault(createNewMarkdownEngine(), makeTestDoc('<>'), PasteUrlAsMarkdownLink.Smart, [new vscode.Range(0, 1, 0, 1)], noopToken),
|
||||
false);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user