fix: export SVG/PNG targets .mermaid-rendered svg instead of first svg (Lucide icon)
This commit is contained in:
@@ -441,7 +441,7 @@ function fallbackCopy(text) {
|
|||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
|
|
||||||
export function exportMermaidSVG(container) {
|
export function exportMermaidSVG(container) {
|
||||||
var svg = container.querySelector('svg');
|
var svg = container.querySelector('.mermaid-rendered svg');
|
||||||
if (!svg) return;
|
if (!svg) return;
|
||||||
var data = new XMLSerializer().serializeToString(svg);
|
var data = new XMLSerializer().serializeToString(svg);
|
||||||
var blob = new Blob([data], { type: 'image/svg+xml' });
|
var blob = new Blob([data], { type: 'image/svg+xml' });
|
||||||
@@ -449,7 +449,7 @@ export function exportMermaidSVG(container) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function exportMermaidPNG(container) {
|
export function exportMermaidPNG(container) {
|
||||||
var svg = container.querySelector('svg');
|
var svg = container.querySelector('.mermaid-rendered svg');
|
||||||
exportMermaidPNGFromElement(svg);
|
exportMermaidPNGFromElement(svg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user