From 8b1ffe876e0e938a41178197370246864b3b4018 Mon Sep 17 00:00:00 2001 From: Aditya Garg Date: Wed, 16 Oct 2024 09:37:45 +0530 Subject: [PATCH 1/3] fix: $ref not being rendered correctly (#240) --- 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