From 81893686239e5aad394877774d929ff2d2d59cfc Mon Sep 17 00:00:00 2001 From: koy Date: Fri, 16 Aug 2024 21:10:41 +0800 Subject: [PATCH 1/3] chore(docs): correct merimaid docs after upgrade marked --- docs/markdown.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/docs/markdown.md b/docs/markdown.md index 6bc7da803..36d9c5a8d 100644 --- a/docs/markdown.md +++ b/docs/markdown.md @@ -1,6 +1,6 @@ # Markdown configuration -**docsify** uses [marked](https://github.com/markedjs/marked) as its Markdown parser. You can customize how it renders your Markdown content to HTML by customizing `renderer`: +**docsify** uses [marked v13+](https://github.com/markedjs/marked) as its Markdown parser. You can customize how it renders your Markdown content to HTML by customizing `renderer`: ```js window.$docsify = { @@ -31,10 +31,11 @@ window.$docsify = { ## Supports mermaid +!> Currently, docsify doesn't support the async mermaid render ( the limited supported latest merimaid version is `v9.3.0`). + ```js -// Import mermaid // -// +// let num = 0; mermaid.initialize({ startOnLoad: false }); @@ -42,12 +43,12 @@ mermaid.initialize({ startOnLoad: false }); window.$docsify = { markdown: { renderer: { - code(code, lang) { + code({ text, lang }) { if (lang === 'mermaid') { return /* html */ `
${mermaid.render( 'mermaid-svg-' + num++, - code, + text, )}
`; } From cae505f9806cc4cc8e1ccb28d5ae9a501bbb6cae Mon Sep 17 00:00:00 2001 From: koy Date: Fri, 16 Aug 2024 21:13:50 +0800 Subject: [PATCH 2/3] chore(docs): correct merimaid docs after upgrade marked --- docs/markdown.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/markdown.md b/docs/markdown.md index 36d9c5a8d..f59220c53 100644 --- a/docs/markdown.md +++ b/docs/markdown.md @@ -35,7 +35,7 @@ window.$docsify = { ```js // -// +// let num = 0; mermaid.initialize({ startOnLoad: false }); From f262d112e29de7f57090fb4be5f6f3e695269b37 Mon Sep 17 00:00:00 2001 From: Luffy <52o@qq52o.cn> Date: Sat, 17 Aug 2024 08:44:06 +0800 Subject: [PATCH 3/3] docs: Update docs/markdown.md --- docs/markdown.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/markdown.md b/docs/markdown.md index f59220c53..f6cdf6242 100644 --- a/docs/markdown.md +++ b/docs/markdown.md @@ -31,7 +31,7 @@ window.$docsify = { ## Supports mermaid -!> Currently, docsify doesn't support the async mermaid render ( the limited supported latest merimaid version is `v9.3.0`). +!> Currently, docsify doesn't support the async mermaid render (the latest mermaid version supported is `v9.3.0`). ```js //