Smart markdown pasting does not occur in tilde code block (#189004)

smart paste checks ~~~ code block
This commit is contained in:
Meghan Kulkarni
2023-07-27 09:09:38 -07:00
committed by GitHub
parent b448b21744
commit df16c16211
2 changed files with 10 additions and 2 deletions

View File

@@ -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);