Update MonacoHelper.cs

This commit is contained in:
PesBandi 2024-10-03 13:48:09 +02:00 committed by GitHub
parent 55bcde495d
commit cfbdf71d61
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -87,6 +87,7 @@ namespace Peek.FilePreviewer.Previewers
html = html.Replace("[[PT_CODE]]", base64FileCode, StringComparison.InvariantCulture); html = html.Replace("[[PT_CODE]]", base64FileCode, StringComparison.InvariantCulture);
html = html.Replace("[[PT_URL]]", Microsoft.PowerToys.FilePreviewCommon.MonacoHelper.VirtualHostName, StringComparison.InvariantCulture); html = html.Replace("[[PT_URL]]", Microsoft.PowerToys.FilePreviewCommon.MonacoHelper.VirtualHostName, StringComparison.InvariantCulture);
html = html.Replace("[[PT_MINIMAP]]", minimap ? "true" : "false", StringComparison.InvariantCulture); html = html.Replace("[[PT_MINIMAP]]", minimap ? "true" : "false", StringComparison.InvariantCulture);
string filename = tempFolder + "\\" + Guid.NewGuid().ToString() + ".html"; string filename = tempFolder + "\\" + Guid.NewGuid().ToString() + ".html";
File.WriteAllText(filename, html); File.WriteAllText(filename, html);
return filename; return filename;