Skip to content

Commit

Permalink
fix: rolling back #240 because introduces this regresion #247 (#249)
Browse files Browse the repository at this point in the history
  • Loading branch information
ivangsa authored Jan 6, 2025
1 parent 6bbb2a7 commit 3070fb5
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/PreviewWebPanel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ 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 = `
<!DOCTYPE html>
<html>
Expand All @@ -134,9 +134,11 @@ function getWebviewContent(context: vscode.ExtensionContext, webview: vscode.Web
<script src="${asyncapiComponentJs}"></script>
<script>
const vscode = acquireVsCodeApi();
const schema = ${JSON.stringify(asyncapiContent)};
AsyncApiStandalone.render({
schema: schema,
schema: {
url: '${asyncapiWebviewUri}',
options: { method: "GET", mode: "cors" },
},
config: {
show: {
sidebar: true,
Expand Down

0 comments on commit 3070fb5

Please sign in to comment.