Skip to content

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

@ajuckel

Description

@ajuckel

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.

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions