mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-19 08:08:39 +01:00
API 💄 for NotebookCellData
This commit is contained in:
@@ -141,16 +141,16 @@ suite('Notebook Document', function () {
|
||||
const edit = new vscode.WorkspaceEdit();
|
||||
edit.replaceNotebookCells(document.uri, new vscode.NotebookRange(0, 0), [{
|
||||
kind: vscode.NotebookCellKind.Markup,
|
||||
language: 'markdown',
|
||||
languageId: 'markdown',
|
||||
metadata: undefined,
|
||||
outputs: [],
|
||||
source: 'new_markdown'
|
||||
value: 'new_markdown'
|
||||
}, {
|
||||
kind: vscode.NotebookCellKind.Code,
|
||||
language: 'fooLang',
|
||||
languageId: 'fooLang',
|
||||
metadata: undefined,
|
||||
outputs: [],
|
||||
source: 'new_code'
|
||||
value: 'new_code'
|
||||
}]);
|
||||
|
||||
const success = await vscode.workspace.applyEdit(edit);
|
||||
@@ -178,16 +178,16 @@ suite('Notebook Document', function () {
|
||||
const edit = new vscode.WorkspaceEdit();
|
||||
edit.replaceNotebookCells(document.uri, new vscode.NotebookRange(0, 1), [{
|
||||
kind: vscode.NotebookCellKind.Markup,
|
||||
language: 'markdown',
|
||||
languageId: 'markdown',
|
||||
metadata: undefined,
|
||||
outputs: [],
|
||||
source: 'new2_markdown'
|
||||
value: 'new2_markdown'
|
||||
}, {
|
||||
kind: vscode.NotebookCellKind.Code,
|
||||
language: 'fooLang',
|
||||
languageId: 'fooLang',
|
||||
metadata: undefined,
|
||||
outputs: [],
|
||||
source: 'new2_code'
|
||||
value: 'new2_code'
|
||||
}]);
|
||||
const success = await vscode.workspace.applyEdit(edit);
|
||||
assert.strictEqual(success, true);
|
||||
@@ -214,16 +214,16 @@ suite('Notebook Document', function () {
|
||||
const edit = new vscode.WorkspaceEdit();
|
||||
edit.replaceNotebookCells(document.uri, new vscode.NotebookRange(0, 0), [{
|
||||
kind: vscode.NotebookCellKind.Markup,
|
||||
language: 'markdown',
|
||||
languageId: 'markdown',
|
||||
metadata: undefined,
|
||||
outputs: [],
|
||||
source: 'new_markdown'
|
||||
value: 'new_markdown'
|
||||
}, {
|
||||
kind: vscode.NotebookCellKind.Code,
|
||||
language: 'fooLang',
|
||||
languageId: 'fooLang',
|
||||
metadata: undefined,
|
||||
outputs: [],
|
||||
source: 'new_code'
|
||||
value: 'new_code'
|
||||
}]);
|
||||
|
||||
const event = utils.asPromise<vscode.NotebookCellsChangeEvent>(vscode.notebook.onDidChangeNotebookCells);
|
||||
@@ -261,16 +261,16 @@ suite('Notebook Document', function () {
|
||||
const edit = new vscode.WorkspaceEdit();
|
||||
edit.replaceNotebookCells(notebook.uri, new vscode.NotebookRange(0, 0), [{
|
||||
kind: vscode.NotebookCellKind.Markup,
|
||||
language: 'markdown',
|
||||
languageId: 'markdown',
|
||||
metadata: undefined,
|
||||
outputs: [],
|
||||
source: 'new_markdown'
|
||||
value: 'new_markdown'
|
||||
}, {
|
||||
kind: vscode.NotebookCellKind.Code,
|
||||
language: 'fooLang',
|
||||
languageId: 'fooLang',
|
||||
metadata: undefined,
|
||||
outputs: [],
|
||||
source: 'new_code'
|
||||
value: 'new_code'
|
||||
}]);
|
||||
|
||||
const success = await vscode.workspace.applyEdit(edit);
|
||||
|
||||
Reference in New Issue
Block a user