mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-24 10:38:59 +01:00
Smart markdown pasting does not occur in tilde code block (#189004)
smart paste checks ~~~ code block
This commit is contained in:
@@ -141,13 +141,20 @@ suite('createEditAddingLinksForUriList', () => {
|
||||
assert.strictEqual(smartPaste.pasteAsMarkdownLink, true);
|
||||
});
|
||||
|
||||
test('Should evaluate pasteAsMarkdownLink as false for pasting within a code block', () => {
|
||||
test('Should evaluate pasteAsMarkdownLink as false for pasting within a backtick code block', () => {
|
||||
skinnyDocument.getText = function () { return '```\r\n\r\n```'; };
|
||||
const range = new vscode.Range(0, 5, 0, 5);
|
||||
const smartPaste = checkSmartPaste(skinnyDocument, range);
|
||||
assert.strictEqual(smartPaste.pasteAsMarkdownLink, false);
|
||||
});
|
||||
|
||||
test('Should evaluate pasteAsMarkdownLink as false for pasting within a tilde code block', () => {
|
||||
skinnyDocument.getText = function () { return '~~~\r\n\r\n~~~'; };
|
||||
const range = new vscode.Range(0, 5, 0, 5);
|
||||
const smartPaste = checkSmartPaste(skinnyDocument, range);
|
||||
assert.strictEqual(smartPaste.pasteAsMarkdownLink, false);
|
||||
});
|
||||
|
||||
test('Should evaluate pasteAsMarkdownLink as false for pasting within a math block', () => {
|
||||
skinnyDocument.getText = function () { return '$$$\r\n\r\n$$$'; };
|
||||
const range = new vscode.Range(0, 5, 0, 5);
|
||||
|
||||
Reference in New Issue
Block a user