Commit b96f1e5
committed
fix(mermaid): escape special characters in node labels
Fixes issue #21: parentheses and other special characters in node names
now break Mermaid rendering on GitHub.
Added escapeMermaidLabel() helper that wraps labels in double quotes
when they contain Mermaid shape delimiters or special characters:
( ) { } [ ] / \
This allows nodes like "Firebase Hosting (Tenant UI)" to render correctly
in all generated Mermaid diagrams. The quoted labels are properly
interpreted by Mermaid parsers as literal text.
Fixes #211 parent bc1c8cd commit b96f1e5
1 file changed
Lines changed: 24 additions & 4 deletions
File tree
- src/operations
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
145 | 145 | | |
146 | 146 | | |
147 | 147 | | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
148 | 167 | | |
149 | 168 | | |
150 | 169 | | |
| |||
161 | 180 | | |
162 | 181 | | |
163 | 182 | | |
| 183 | + | |
164 | 184 | | |
165 | 185 | | |
166 | | - | |
| 186 | + | |
167 | 187 | | |
168 | | - | |
| 188 | + | |
169 | 189 | | |
170 | | - | |
| 190 | + | |
171 | 191 | | |
172 | 192 | | |
173 | | - | |
| 193 | + | |
174 | 194 | | |
175 | 195 | | |
176 | 196 | | |
| |||
0 commit comments