mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-09 18:39:41 +02:00
Fix non-htmlLabel text replacement so markdown styling remains
This commit is contained in:
@@ -199,7 +199,9 @@ async function addText<T extends SVGGraphicsElement>(
|
||||
|
||||
if (!useHtmlLabels) {
|
||||
const textChild = text.children[0];
|
||||
textChild.textContent = inputText.replaceAll('>', '>').replaceAll('<', '<').trim();
|
||||
for (const child of textChild.children) {
|
||||
child.textContent = child.textContent.replaceAll('>', '>').replaceAll('<', '<');
|
||||
}
|
||||
// Get the bounding box after the text update
|
||||
bbox = text.getBBox();
|
||||
// Add extra height so it is similar to the html labels
|
||||
|
Reference in New Issue
Block a user