mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-27 20:13:32 +01:00
fix-71570 Added logic to handle markdown preview update on file rename and delete
This commit is contained in:
@@ -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' })
|
||||
|
||||
Reference in New Issue
Block a user