@devries-cameron20 / composio-1 / commits / cb21004e9
Fork 0

Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.

docs: decode HTML entities in mermaid chart output for LLMs

Decode &#x22; &#x27; &amp; back to " ' & in mermaid code blocks so the markdown output is clean and readable for AI consumers. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

Sushmitha Mallesh committed Mar 4, 2026 at 00:45 UTC cb21004e96faac17e2d8ee1d283a6495b3066afb
1 file changed +3 -1
docs/lib/source.ts
+3 -1
@@ -416,7 +416,9 @@ ${page.data.description || ''}`;
416 const cleanSegments = segments.map(s => mdxToCleanMarkdown(s));
417 let cleanContent = cleanSegments[0];
418 for (let i = 0; i < mermaidCharts.length; i++) {
419 - cleanContent += `\n\n\`\`\`mermaid\n${mermaidCharts[i]}\n\`\`\`\n\n${cleanSegments[i + 1]}`;
419 + // Decode HTML entities that fumadocs encodes in JSX attributes
420 + const chart = mermaidCharts[i].replace(/&#x22;/g, '"').replace(/&#x27;/g, "'").replace(/&amp;/g, '&');
421 + cleanContent += `\n\n\`\`\`mermaid\n${chart}\n\`\`\`\n\n${cleanSegments[i + 1]}`;
422 }
423
424 const footer = includeFooter