Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mermaid default startOnLoad does not work on code blocks with syntax highlighting #6360

Open
chrisirhc opened this issue Mar 7, 2025 · 0 comments · May be fixed by #6361
Open

Mermaid default startOnLoad does not work on code blocks with syntax highlighting #6360

chrisirhc opened this issue Mar 7, 2025 · 0 comments · May be fixed by #6361
Labels
Status: Triage Needs to be verified, categorized, etc

Comments

@chrisirhc
Copy link

A code snippet contains syntax highlighting, it currently will fail to render with the default integration.

Example: https://codepen.io/chrisirhc/pen/bNGRvZj

I propose that the default integration make use of textContent of the target element instead of the innerHTML which contains html tags.

Why

Currently, bloggers need to choose between syntax highlighting mermaid diagrams codes or rendering the diagrams. They can't easily have both unless they do some additional customisations.

@github-actions github-actions bot added the Status: Triage Needs to be verified, categorized, etc label Mar 7, 2025
@chrisirhc chrisirhc linked a pull request Mar 7, 2025 that will close this issue
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Triage Needs to be verified, categorized, etc
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant