mirror of
https://github.com/Microsoft/vscode
synced 2024-10-02 09:18:59 +00:00
parent
2eb66826bd
commit
da36e0eba1
|
@ -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);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue