Enable HTML labels in Mermaid diagram rendering #152
Labels
No labels
bug
contract
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
iterative-works/iw-cli#152
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
Mermaid diagrams rendered in the dashboard don't support HTML/Markdown in labels, causing formatting issues. For example, when a diagram uses line breaks and italics in node labels like:
The
<br/>and<i>tags are rendered literally instead of being interpreted as HTML, resulting in labels likeDocumentMatrixTableEnhancedmodifiedinstead of:GitLab renders these correctly because it runs Mermaid in "Markdown-compatible" mode with HTML labels enabled.
Solution
Update the Mermaid configuration to enable HTML labels:
This will allow:
<br/>for line breaks in labels<i>,<b>, etc. for text formatting_italic_in labels (depending on Mermaid version)Security Consideration
Enabling
htmlLabels: trueallows HTML in diagram labels. Since we control the content being rendered (review artifacts, analysis documents), this should be safe. However, if user-provided content is ever rendered, sanitization would be needed.References