Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade mermaid version to 11.2.0 #282

Merged
merged 1 commit into from
Sep 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Adds [Mermaid](https://mermaid-js.github.io/mermaid/#/) diagram and flowchart su

![A mermaid diagram in VS Code's built-in markdown preview](https://github.com/mjbvz/vscode-markdown-mermaid/raw/master/docs/example.png)

Currently supports Mermaid version 11.1.0.
Currently supports Mermaid version 11.2.0.

## Usage

Expand Down
6 changes: 3 additions & 3 deletions notebook/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type * as MarkdownIt from 'markdown-it';
import mermaid from 'mermaid';
import mermaid, { MermaidConfig } from 'mermaid';
import type { RendererContext } from 'vscode-notebook-renderer';
import { renderMermaidBlocksInElement } from '../markdownPreview/mermaid';
import { extendMarkdownItWithMermaid } from '../src/mermaid';
Expand All @@ -14,7 +14,7 @@ export async function activate(ctx: RendererContext<void>) {
throw new Error(`Could not load 'vscode.markdown-it-renderer'`);
}

const config = {
const config: MermaidConfig = {
startOnLoad: false,
theme: document.body.classList.contains('vscode-dark') || document.body.classList.contains('vscode-high-contrast') ? 'dark' : 'default'
};
Expand Down Expand Up @@ -43,4 +43,4 @@ export async function activate(ctx: RendererContext<void>) {
}
return md;
});
};
};
9 changes: 4 additions & 5 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
"@types/vscode-notebook-renderer": "^1.72.0",
"babel-loader": "^8.2.2",
"css-loader": "^6.7.3",
"mermaid": "^11.1.0",
"mermaid": "^11.2.0",
"mini-css-extract-plugin": "^2.2.2",
"npm-run-all": "^4.1.5",
"style-loader": "^3.2.1",
Expand All @@ -111,4 +111,4 @@
"package-ext-web": "webpack --mode production --devtool hidden-source-map --config ./build/web-extension.webpack.config.js",
"vscode:prepublish": "npm-run-all package-ext package-ext-web build-preview build-notebook"
}
}
}