mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-16 05:49:43 +02:00
#1295 for Multi line labels separated with \n
This commit is contained in:
@@ -3,7 +3,7 @@ const createLabel = (vertexText, style) => {
|
|||||||
svgLabel.setAttribute('style', style.replace('color:', 'fill:'));
|
svgLabel.setAttribute('style', style.replace('color:', 'fill:'));
|
||||||
let rows = [];
|
let rows = [];
|
||||||
if (vertexText) {
|
if (vertexText) {
|
||||||
rows = vertexText.split(/\n|<br\s*\/?>/gi);
|
rows = vertexText.split(/\\n|\n|<br\s*\/?>/gi);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (let j = 0; j < rows.length; j++) {
|
for (let j = 0; j < rows.length; j++) {
|
||||||
|
Reference in New Issue
Block a user