Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 12, 2025

Investigation of reported issue: "Mermaid diagram support not on website, all the mermaid diagrams coming as text rather than diagram."

Findings

Mermaid diagrams render correctly in current codebase. Tested:

  • Development build (npm run dev)
  • Production build (npm run build + npm run preview)

Current Implementation

The feature was added in PR #119 and includes:

  • mermaid package v11.12.1
  • Mermaid.jsx component with async rendering
  • LessonTemplate.jsx integration detecting language-mermaid code blocks
  • Theme synchronization (light/dark)
// Mermaid.jsx - renders diagrams via mermaid.render()
const { svg } = await mermaid.render(id, chart);
setSvg(svg);

// LessonTemplate.jsx - detects and routes mermaid blocks
if (className === 'language-mermaid') {
  return <Mermaid chart={String(children).trim()} theme={theme} />;
}

Screenshot

Sequence diagram rendering correctly:

Mermaid diagram working

Conclusion

No code changes required. Feature is functional. Issue may have been:

Original prompt

Mermaid diagram support not on website, all the mermaid diagrams coming as text rather than diagram.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

@vercel
Copy link

vercel bot commented Nov 12, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
hacking-tutorial Ready Ready Preview Comment Nov 12, 2025 10:26pm

Copilot AI changed the title [WIP] Fix Mermaid diagram rendering on website Verify Mermaid diagram support is working correctly Nov 12, 2025
Copilot AI requested a review from amandewatnitrr November 12, 2025 22:35
@amandewatnitrr amandewatnitrr marked this pull request as ready for review November 12, 2025 22:40
Copilot AI review requested due to automatic review settings November 12, 2025 22:40
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review any files in this pull request.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@amandewatnitrr amandewatnitrr merged commit fc28027 into main Nov 12, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants