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

Markdown-by-default for labels complicates the upgrade from Mermaid 10 to Mermaid 11 #6275

Open
ajuckel opened this issue Feb 13, 2025 · 0 comments · May be fixed by #6277
Open

Markdown-by-default for labels complicates the upgrade from Mermaid 10 to Mermaid 11 #6275

ajuckel opened this issue Feb 13, 2025 · 0 comments · May be fixed by #6277
Labels
Status: Triage Needs to be verified, categorized, etc

Comments

@ajuckel
Copy link

ajuckel commented Feb 13, 2025

When trying to upgrade an external project from Mermaid 10 to Mermaid 11, several diagrams had broken rendering due to new Unsupported markdown errors. From the docs, I assumed markdown formatting for labels would be opt-in, by enclosing the label in double-quote-backticks. That seemed to be the behavior in 10.7, but in 11.4.1, double-quote-backtick seems to be simply removed from the label with no effect, and all labels are rendered as markdown.

I think it's too late to change the default behavior, as anyone who started with Mermaid 11 will likely expect all labels to be rendered as markdown. I would like to add a configuration setting to enable a backwards compatibility mode, where markdown is only enabled if a label is enclosed in double-quote-backticks. Backwards compatibility would default to false, but if set to true via any of the normal configuration mechanisms, the prior behavior would be restored.

I feel the availability of this option would also give users who run in to any markdown issues when upgrading an escape hatch. They could upgrade to 11.x with the backwards compat turned on, and choose whether or not to upgrade their diagrams over time to be markdown-compatible.

@github-actions github-actions bot added the Status: Triage Needs to be verified, categorized, etc label Feb 13, 2025
@ajuckel ajuckel linked a pull request Feb 13, 2025 that will close this issue
9 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