#2951 Fix for styling issue on labes when using htmlLabels in legacy flowcharts

This commit is contained in:
Knut Sveidqvist
2022-05-10 17:45:12 +02:00
parent 3cb926727c
commit 6cea0fd835

View File

@@ -241,7 +241,9 @@ export const addEdges = function (edges, g) {
if (evaluate(getConfig().flowchart.htmlLabels)) {
edgeData.labelType = 'html';
edgeData.label = `<span id="L-${linkId}" class="edgeLabel L-${linkNameStart}' L-${linkNameEnd}">${edge.text.replace(
edgeData.label = `<span id="L-${linkId}" class="edgeLabel L-${linkNameStart}' L-${linkNameEnd}" style="${
edgeData.labelStyle
}">${edge.text.replace(
/fa[lrsb]?:fa-[\w-]+/g,
(s) => `<i class='${s.replace(':', ' ')}'></i>`
)}</span>`;