Merge pull request #1788 from PetrLaskevic/develop

fix: light background with dark diagram theme when downloading SVG ([#1777](https://github.com/mermaid-js/mermaid-live-editor/issues/1777))
This commit is contained in:
Sidharth Vinod
2025-09-03 12:37:03 +00:00
committed by GitHub
+2
View File
@@ -50,6 +50,8 @@
svg = getSvgElement();
}
svg.style.backgroundColor = `hsl(${window.getComputedStyle(document.body).getPropertyValue('--background')})`;
const svgString = svg.outerHTML
.replaceAll('<br>', '<br/>')
.replaceAll(/<img([^>]*)>/g, (m, g: string) => `<img ${g} />`);