We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ed63fea commit 02b56c2Copy full SHA for 02b56c2
remote-content/remote-sources/repo-transforms.js
@@ -79,9 +79,13 @@ function applyBasicMdxFixes(content) {
79
80
return `:::${docusaurusType}\n${cleanContent}\n:::\n`;
81
})
82
- // Fix HTML comments for MDX compatibility
83
- .replace(/<!--\s*/g, '{/* ')
84
- .replace(/\s*-->/g, ' */}')
+ // Fix HTML comments for MDX compatibility (without breaking Mermaid arrows)
+ .replace(/<!--([\s\S]*?)-->/g, (_match, comment) => {
+ const normalized = comment
85
+ .replace(/^\s*/, ' ')
86
+ .replace(/\s*$/, ' ');
87
+ return `{/*${normalized}*/}`;
88
+ })
89
// Fix HTML tags for MDX compatibility
90
.replace(/<br>/g, '<br />')
91
.replace(/<br([^/>]*?)>/g, '<br$1 />')
0 commit comments