mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-26 10:49:38 +02:00
chore: fixed formatting
This commit is contained in:
@@ -16,6 +16,7 @@ function applyStyle(dom, styleFn) {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {any} node
|
* @param {any} node
|
||||||
|
* @param config
|
||||||
* @returns {SVGForeignObjectElement} Node
|
* @returns {SVGForeignObjectElement} Node
|
||||||
*/
|
*/
|
||||||
function addHtmlLabel(node, config) {
|
function addHtmlLabel(node, config) {
|
||||||
@@ -33,8 +34,8 @@ function addHtmlLabel(node, config) {
|
|||||||
'>' +
|
'>' +
|
||||||
label +
|
label +
|
||||||
'</span>',
|
'</span>',
|
||||||
config,
|
config
|
||||||
),
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
applyStyle(div, node.labelStyle);
|
applyStyle(div, node.labelStyle);
|
||||||
@@ -65,7 +66,7 @@ const createLabel = (_vertexText, style, isTitle, isNode) => {
|
|||||||
isNode,
|
isNode,
|
||||||
label: decodeEntities(vertexText).replace(
|
label: decodeEntities(vertexText).replace(
|
||||||
/fa[blrs]?:fa-[\w-]+/g, // cspell: disable-line
|
/fa[blrs]?:fa-[\w-]+/g, // cspell: disable-line
|
||||||
(s) => `<i class='${s.replace(':', ' ')}'></i>`,
|
(s) => `<i class='${s.replace(':', ' ')}'></i>`
|
||||||
),
|
),
|
||||||
labelStyle: style.replace('fill:', 'color:'),
|
labelStyle: style.replace('fill:', 'color:'),
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user