Commit 21d8c8ca authored by Stan Hu's avatar Stan Hu

Update Mermaid to 8.1.0

This fixes dotted lines not rendering when the htmlLabels setting is
false (https://github.com/knsv/mermaid/pull/828).

Full list of changes: https://github.com/knsv/mermaid/releases

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/60869
parent 76889a99
...@@ -59,6 +59,14 @@ export default function renderMermaid($els) { ...@@ -59,6 +59,14 @@ export default function renderMermaid($els) {
mermaid.init(undefined, el, id => { mermaid.init(undefined, el, id => {
const svg = document.getElementById(id); const svg = document.getElementById(id);
// As of https://github.com/knsv/mermaid/commit/57b780a0d,
// Mermaid will make two init callbacks:one to initialize the
// flow charts, and another to initialize the Gannt charts.
// Guard against an error caused by double initialization.
if (svg.classList.contains('mermaid')) {
return;
}
svg.classList.add('mermaid'); svg.classList.add('mermaid');
// pre > code > svg // pre > code > svg
......
---
title: Update Mermaid to 8.1.0
merge_request: 30036
author:
type: fixed
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment