Fix mermaid import

Signed-off-by: David Mehren <git@herrmehren.de>
This commit is contained in:
David Mehren 2021-12-02 19:11:28 +01:00
parent b87fd60314
commit 381d360d58
No known key found for this signature in database
GPG key ID: 185982BA4C42B7C3

View file

@ -387,7 +387,7 @@ export function finishView (view) {
const $ele = $(value).closest('pre') const $ele = $(value).closest('pre')
require.ensure([], function (require) { require.ensure([], function (require) {
try { try {
const mermaid = require('mermaid') const mermaid = require('mermaid').default
mermaid.startOnLoad = false mermaid.startOnLoad = false
mermaid.mermaidAPI.parse($value.text()) mermaid.mermaidAPI.parse($value.text())
$ele.addClass('mermaid') $ele.addClass('mermaid')