Commit 4e160f2
warren.q
fix: allow <br> line breaks in Mermaid node labels
The GitHub theme CSS sets 'code br { display: none }' which hides <br>
elements inside Mermaid <code> blocks, preventing multi-line node labels.
This fix:
1. Adds a CSS override for code.mermaid br to restore display
2. Recalculates SVG viewBox after rendering to prevent clipping
3. Sets securityLevel to 'loose' so Mermaid preserves <br> tags
Fixes #2631 parent ccf738f commit 4e160f2
2 files changed
Lines changed: 23 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
335 | 335 | | |
336 | 336 | | |
337 | 337 | | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
338 | 347 | | |
339 | 348 | | |
340 | 349 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
8 | 20 | | |
9 | 21 | | |
10 | 22 | | |
| |||
19 | 31 | | |
20 | 32 | | |
21 | 33 | | |
22 | | - | |
| 34 | + | |
23 | 35 | | |
24 | 36 | | |
25 | 37 | | |
| |||
28 | 40 | | |
29 | 41 | | |
30 | 42 | | |
| 43 | + | |
31 | 44 | | |
32 | 45 | | |
33 | 46 | | |
| |||
0 commit comments