diff --git a/docs/markdown.md b/docs/markdown.md index 6bc7da803..f6cdf6242 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 latest mermaid version supported 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, )}
`; }