mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-19 16:18:58 +01:00
Styling
This commit is contained in:
@@ -399,8 +399,7 @@ export class MarkdownPreview extends Disposable {
|
||||
this.editor.webview.options = MarkdownPreview.getWebviewOptions(resource, this._contributionProvider.contributions);
|
||||
this.editor.webview.html = content;
|
||||
}
|
||||
}
|
||||
catch (e) {
|
||||
} catch {
|
||||
await this.showFileNotFoundError();
|
||||
}
|
||||
}
|
||||
@@ -463,8 +462,7 @@ export class MarkdownPreview extends Disposable {
|
||||
|
||||
try {
|
||||
vscode.workspace.openTextDocument(this._resource).then(vscode.window.showTextDocument);
|
||||
}
|
||||
catch (e) {
|
||||
} catch {
|
||||
await this.showFileNotFoundError();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -90,9 +90,9 @@ export class MarkdownContentProvider {
|
||||
</html>`;
|
||||
}
|
||||
|
||||
public async provideFileNotFoundContent(
|
||||
public provideFileNotFoundContent(
|
||||
resource: vscode.Uri,
|
||||
): Promise<string> {
|
||||
): string {
|
||||
const resourcePath = path.basename(resource.fsPath);
|
||||
const body = localize('preview.notFound', '{0} cannot be found', resourcePath);
|
||||
return `<!DOCTYPE html>
|
||||
|
||||
Reference in New Issue
Block a user