Skip to content

Commit efe4748

Browse files
committed
fix: Improve Mermaid code block detection and fix duplicate variable
- Fixed duplicate svg variable declaration - Improved code block detection with multiple selectors - Added fallback to detect mermaid syntax in all code blocks - Better handling of Jekyll/Kramdown rendered code blocks
1 parent c306e4c commit efe4748

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

docs_site/_layouts/default.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -674,9 +674,9 @@
674674
mermaidEl.style.height = 'auto';
675675
}
676676

677-
const svg = wrapper.querySelector('svg');
678-
if (svg) {
679-
svg.style.cssText = 'display: block !important; visibility: visible !important; opacity: 1 !important; width: auto !important; height: auto !important; max-width: none !important; max-height: none !important;';
677+
const svgEl = wrapper.querySelector('svg');
678+
if (svgEl) {
679+
svgEl.style.cssText = 'display: block !important; visibility: visible !important; opacity: 1 !important; width: auto !important; height: auto !important; max-width: none !important; max-height: none !important;';
680680
}
681681

682682
// Center scroll position after a brief moment

0 commit comments

Comments
 (0)