File tree Expand file tree Collapse file tree 2 files changed +3
-24
lines changed
Expand file tree Collapse file tree 2 files changed +3
-24
lines changed Original file line number Diff line number Diff line change 11{
22 "name" : " @interledger/docs-design-system" ,
3- "version" : " 0.10.2 " ,
3+ "version" : " 0.10.1 " ,
44 "type" : " module" ,
55 "description" : " Shared styles and components used across all Interledger Starlight documentation sites" ,
66 "exports" : {
Original file line number Diff line number Diff line change @@ -29,27 +29,6 @@ const { graph, hasBorder = false } = Astro.props
2929</style >
3030
3131<script >
32- import mermaid from '/node_modules/mermaid/dist/mermaid.esm.min.mjs'
33- mermaid.initialize({ startOnLoad: false })
34-
35- const mermaidElements = document.querySelectorAll('pre.mermaid')
36-
37- function unescapeHTML(str) {
38- return str
39- .replaceAll('>', '>')
40- .replaceAll('<', '<')
41- .replaceAll('&', '&')
42- }
43-
44- async function drawDiagram(mermaidElement) {
45- let graphDefinition = mermaidElement.innerHTML
46- graphDefinition = unescapeHTML(graphDefinition)
47- const id = `graphDiv${Math.floor(Math.random() * 10000)}`
48- const { svg } = await mermaid.render(id, graphDefinition)
49- mermaidElement.innerHTML = svg
50- }
51-
52- for (const mermaidElement of mermaidElements) {
53- await drawDiagram(mermaidElement)
54- }
32+ import mermaid from "/node_modules/mermaid/dist/mermaid.esm.min.mjs";
33+ mermaid.initialize({ startOnLoad: true });
5534</script >
You can’t perform that action at this time.
0 commit comments