#520 - Add url protocol

This commit is contained in:
Elio Struyf
2023-03-04 12:11:42 +01:00
parent 34f5e9c41b
commit 9f11b94c60
2 changed files with 3 additions and 1 deletions
+1
View File
@@ -24,6 +24,7 @@
### 🐞 Fixes
- [#518](https://github.com/estruyf/vscode-front-matter/issues/518): Fix an issue where the `YAML` parser adds line breaks to long strings
- [#520](https://github.com/estruyf/vscode-front-matter/issues/520): Add the URL protocol to the host on opening the preview if it's missing
## [8.3.0] - 2022-02-14 - [Release notes](https://beta.frontmatter.codes/updates/v8.3.0)
+2 -1
View File
@@ -161,7 +161,8 @@ export class Preview {
light: Uri.file(join(extensionPath, 'assets/icons/frontmatter-short-light.svg'))
};
const localhostUrl = await env.asExternalUri(Uri.parse(settings.host));
const crntUrl = settings.host.startsWith('http') ? settings.host : `http://${settings.host}`;
const localhostUrl = await env.asExternalUri(Uri.parse(crntUrl));
const cspSource = webView.webview.cspSource;