diff --git a/packages/gitbook/src/components/DocumentView/CodeBlock/mermaid-runtime-path.ts b/packages/gitbook/src/components/DocumentView/CodeBlock/mermaid-runtime-path.ts index 15e3eea05..ede08b53c 100644 --- a/packages/gitbook/src/components/DocumentView/CodeBlock/mermaid-runtime-path.ts +++ b/packages/gitbook/src/components/DocumentView/CodeBlock/mermaid-runtime-path.ts @@ -1 +1 @@ -export const MERMAID_RUNTIME_PATH = 'mermaid/mermaid@11.14.0-patch.b4f92f7b-zenuml@0.2.2.mjs'; +export const MERMAID_RUNTIME_PATH = 'mermaid/mermaid@11.14.0-patch.caefc3e9-zenuml@0.2.2.mjs'; diff --git a/patches/mermaid@11.14.0.patch b/patches/mermaid@11.14.0.patch index 2a625ac1c..006ea4112 100644 --- a/patches/mermaid@11.14.0.patch +++ b/patches/mermaid@11.14.0.patch @@ -11,3 +11,16 @@ index f37722f2f65d3c49904ec704998a9a0ce6f01d21..0b97ddef583d120235530222990f08db db2.setBlock(obj); nodeEl.remove(); } +diff --git a/dist/chunks/mermaid.core/chunk-U2HBQHQK.mjs b/dist/chunks/mermaid.core/chunk-U2HBQHQK.mjs +index 6f5ff605824cec370f0ff1077fe3005823fa59f5..1468e9b37b3c1ef3449774b816202e3143174476 100644 +--- a/dist/chunks/mermaid.core/chunk-U2HBQHQK.mjs ++++ b/dist/chunks/mermaid.core/chunk-U2HBQHQK.mjs +@@ -308,7 +308,7 @@ async function addHtmlSpan(element, node, width, classes, addBackground = false, + div.attr("class", "labelBkg"); + } + let bbox = div.node().getBoundingClientRect(); +- if (bbox.width === width) { ++ if (Math.round(bbox.width) === width) { + div.style("display", "table"); + div.style("white-space", "break-spaces"); + div.style("width", width + "px");