fix-71570 Added logic to handle markdown preview update on file rename and delete

This commit is contained in:
pkoushik
2019-04-05 11:38:18 +05:30
parent d234937aed
commit 3cef5067be
2 changed files with 45 additions and 15 deletions

View File

@@ -90,6 +90,18 @@ export class MarkdownContentProvider {
</html>`;
}
public async provideFileNotFoundContent(
resource: vscode.Uri,
): Promise<string> {
const resourcePath = path.basename(resource.fsPath);
return `<!DOCTYPE html>
<html>
<body class="vscode-body">
${resourcePath} cannot be found.
</body>
</html>`;
}
private extensionResourcePath(mediaFile: string): string {
return vscode.Uri.file(this.context.asAbsolutePath(path.join('media', mediaFile)))
.with({ scheme: 'vscode-resource' })