mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-12-02 18:45:14 +01:00
revert: changes in createLabel
on-behalf-of: @Mermaid-Chart <hello@mermaidchart.com>
This commit is contained in:
@@ -81,7 +81,7 @@ const createLabel = async (_vertexText, style, isTitle, isNode) => {
|
|||||||
return vertexNode;
|
return vertexNode;
|
||||||
} else {
|
} else {
|
||||||
const svgLabel = document.createElementNS('http://www.w3.org/2000/svg', 'text');
|
const svgLabel = document.createElementNS('http://www.w3.org/2000/svg', 'text');
|
||||||
svgLabel.setAttribute('style', style ? style.replace('color:', 'fill:') : '');
|
svgLabel.setAttribute('style', style.replace('color:', 'fill:'));
|
||||||
let rows = [];
|
let rows = [];
|
||||||
if (typeof vertexText === 'string') {
|
if (typeof vertexText === 'string') {
|
||||||
rows = vertexText.split(/\\n|\n|<br\s*\/?>/gi);
|
rows = vertexText.split(/\\n|\n|<br\s*\/?>/gi);
|
||||||
|
|||||||
Reference in New Issue
Block a user