From e37a912917e9ba1aabf2acec0fc71847e1552517 Mon Sep 17 00:00:00 2001 From: Aditya Garg Date: Tue, 15 Oct 2024 02:24:28 +0530 Subject: [PATCH] standalone-fix --- src/PreviewWebPanel.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/PreviewWebPanel.ts b/src/PreviewWebPanel.ts index fabac06..8428743 100644 --- a/src/PreviewWebPanel.ts +++ b/src/PreviewWebPanel.ts @@ -1,5 +1,6 @@ import * as vscode from 'vscode'; import * as path from 'path'; +import * as fs from 'fs'; let position : {x:0,y:0} = { x: 0, @@ -105,6 +106,8 @@ function getWebviewContent(context: vscode.ExtensionContext, webview: vscode.Web ); const asyncapiWebviewUri = webview.asWebviewUri(asyncapiFile); const asyncapiBasePath = asyncapiWebviewUri.toString().replace('%2B', '+'); // this is loaded by a different library so it requires unescaping the + character + const asyncapiContent = fs.readFileSync(asyncapiFile.fsPath, 'utf-8'); + const html = ` @@ -131,11 +134,9 @@ function getWebviewContent(context: vscode.ExtensionContext, webview: vscode.Web