Files
gitbook/patches/mermaid@11.14.0.patch
T
Peter White b1f16dda2c Fix Mermaid block diagrams not rendering (RND-11167)
Mermaid's block layout keeps a d3 selection on each block's size and then
JSON.stringifies the blocks for a debug log. The selection references
<html>, which React hydrates with circular fiber properties, so rendering
throws and the block falls back to a plain code block. Patch Mermaid to
drop the unused selection, and version the runtime URL by patch hash so
cached runtimes are not reused.
2026-10-14 10:34:19 +02:00

14 lines
785 B
Diff

diff --git a/dist/chunks/mermaid.core/blockDiagram-DXYQGD6D.mjs b/dist/chunks/mermaid.core/blockDiagram-DXYQGD6D.mjs
index f37722f2f65d3c49904ec704998a9a0ce6f01d21..0b97ddef583d120235530222990f08db3de83e5d 100644
--- a/dist/chunks/mermaid.core/blockDiagram-DXYQGD6D.mjs
+++ b/dist/chunks/mermaid.core/blockDiagram-DXYQGD6D.mjs
@@ -3658,7 +3658,7 @@ async function calculateBlockSize(elem, block, db2) {
const nodeEl = await insertNode(elem, node, { config: config2 });
const boundingBox = nodeEl.node().getBBox();
const obj = db2.getBlock(node.id);
- obj.size = { width: boundingBox.width, height: boundingBox.height, x: 0, y: 0, node: nodeEl };
+ obj.size = { width: boundingBox.width, height: boundingBox.height, x: 0, y: 0 };
db2.setBlock(obj);
nodeEl.remove();
}