API updates
This commit is contained in:
Родитель
9698635717
Коммит
43eadfca8e
|
@ -55,4 +55,4 @@
|
|||
"typescript": "^3.8.3",
|
||||
"vscode-test": "^1.3.0"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -42,7 +42,6 @@ class MarkdownProvider implements vscode.NotebookContentProvider {
|
|||
const metadata = new vscode.NotebookDocumentMetadata().with({
|
||||
editable: true,
|
||||
cellEditable: true,
|
||||
cellHasExecutionOrder: false,
|
||||
});
|
||||
const content = Buffer.from(await vscode.workspace.fs.readFile(uri))
|
||||
.toString('utf8');
|
||||
|
@ -57,12 +56,12 @@ class MarkdownProvider implements vscode.NotebookContentProvider {
|
|||
}
|
||||
|
||||
async saveNotebook(document: vscode.NotebookDocument, cancellation: vscode.CancellationToken): Promise<void> {
|
||||
const stringOutput = writeCellsToMarkdown(document.cells);
|
||||
const stringOutput = writeCellsToMarkdown(document.getCells());
|
||||
await vscode.workspace.fs.writeFile(document.uri, Buffer.from(stringOutput));
|
||||
}
|
||||
|
||||
async saveNotebookAs(targetResource: vscode.Uri, document: vscode.NotebookDocument, cancellation: vscode.CancellationToken): Promise<void> {
|
||||
const stringOutput = writeCellsToMarkdown(document.cells);
|
||||
const stringOutput = writeCellsToMarkdown(document.getCells());
|
||||
await vscode.workspace.fs.writeFile(targetResource, Buffer.from(stringOutput));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -120,7 +120,8 @@ function cellDataToFakeCell(cell: vscode.NotebookCellData): vscode.NotebookCell
|
|||
metadata: cell.metadata || new vscode.NotebookCellMetadata(),
|
||||
index: -1,
|
||||
notebook: undefined as any,
|
||||
outputs: []
|
||||
outputs: [],
|
||||
latestExecutionSummary: undefined
|
||||
};
|
||||
}
|
||||
|
||||
|
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
Загрузка…
Ссылка в новой задаче