mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-11-14 17:54:13 +01: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) {
|
if (!useHtmlLabels) {
|
||||||
const textChild = text.children[0];
|
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
|
// Get the bounding box after the text update
|
||||||
bbox = text.getBBox();
|
bbox = text.getBBox();
|
||||||
// Add extra height so it is similar to the html labels
|
// Add extra height so it is similar to the html labels
|
||||||
|
|||||||
Reference in New Issue
Block a user