Skip to content

increase Mermaid MAX_CHAR_LIMIT to a more reasonable default

What does this MR do?

The currently implemented MAX_CHAR_LIMIT for Mermaid is set to just 2000 which is way too low for a lot of use-cases especially when e.g. making nodes clickable in which case all link URLs will also count towards the total character count of the diagram. This problem was initially addressed in #27173 (closed) (based on a default set by the Mermaid project) and there's currently an open issue for it at #207229.

By now, the Mermaid project has raised its default maxTextSize drastically from 5000 to 50000 characters per diagram.
https://github.com/mermaid-js/mermaid/blob/master/src/defaultConfig.js#L57

This MR ensures that GitLab reflects the changes made in Mermaid to also raise its MAX_CHAR_LIMIT to 50000 which will allow diagrams to be shown again without the need of clicking buttons for lazy loading.

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

The affected test was updated.

Merge request reports