Skip to content

Commit

Permalink
wip - fix dark/light by using neutral theme (could be better)
Browse files Browse the repository at this point in the history
  • Loading branch information
spgennard committed Jan 2, 2025
1 parent 1a52ed2 commit 73920f4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -634,7 +634,7 @@ export async function activate(context: ExtensionContext) {

const updateDecorationsOnTextEditor = async (editor: vscode.TextEditor) => {
await vsMarginHandler.updateDecorations(editor);
if (editor.document) {
if (editor && editor.document) {
await linter.updateLinter(editor.document);
}
await colourCommentHandler.updateDecorations(editor);
Expand Down
14 changes: 7 additions & 7 deletions src/vsdotmarkdown.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ export async function view_dot_callgraph(context: vscode.ExtensionContext, setti
const resourcesDirectory = vscode.Uri.joinPath(context.extensionUri, 'resources')

const webviewPanel = vscode.window.createWebviewPanel(
'vscodeTest',
'VsCode test webview',
'cobolCallGraph',
'COBOL Call Graph',
{
viewColumn: vscode.ViewColumn.Beside,
preserveFocus: true
Expand Down Expand Up @@ -85,7 +85,6 @@ function setHtmlContent(webview: vscode.Webview, extensionContext: vscode.Extens
style-src cspSource 'unsafe-inline';
script-src 'nonce-nonce' 'unsafe-inline';
">
<link href="webview.css" rel="stylesheet">
</head>
<body>
<script type="text/javascript">
Expand All @@ -98,10 +97,11 @@ function setHtmlContent(webview: vscode.Webview, extensionContext: vscode.Extens
};
</script>
<script src="https://cdn.jsdelivr.net/npm/mermaid@11.4.1/dist/mermaid.min.js" />
<script>
let config = { startOnLoad: true, darkMode: true, useMaxWidth: true };
mermaid.initialize(config);
<script type="module">
import mermaid from 'https://cdn.jsdelivr.net/npm/mermaid@11/dist/mermaid.esm.min.mjs';
let config = { startOnLoad: true, useMaxWidth: true, theme: "neutral" };
mermaid.initialize(config);
</script>
<div class="mermaid">
Expand Down

0 comments on commit 73920f4

Please sign in to comment.