Skip to content

Commit

Permalink
Merge pull request #282 from StuartFyfe/chore/bump-mermaid-11.2.0
Browse files Browse the repository at this point in the history
Upgrade mermaid version to 11.2.0
  • Loading branch information
mjbvz authored Sep 16, 2024
2 parents e6f863c + 64d8318 commit 8f025c3
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 11 deletions.
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"
}
}
}

0 comments on commit 8f025c3

Please sign in to comment.