diff --git a/src/diagrams/flowchart/flowRenderer.js b/src/diagrams/flowchart/flowRenderer.js index ae6b1caed6..f036a5a66c 100644 --- a/src/diagrams/flowchart/flowRenderer.js +++ b/src/diagrams/flowchart/flowRenderer.js @@ -74,7 +74,7 @@ export const addVertices = function (vert, g) { } else { const svgLabel = document.createElementNS('http://www.w3.org/2000/svg', 'text') - const rows = verticeText.split(/
/) + const rows = verticeText.split(//) for (let j = 0; j < rows.length; j++) { const tspan = document.createElementNS('http://www.w3.org/2000/svg', 'tspan') @@ -203,7 +203,7 @@ export const addEdges = function (edges, g) { edgeData.label = '' + edge.text + '' } else { edgeData.labelType = 'text' - edgeData.style = 'stroke: #333; stroke-width: 1.5px;fill:none' + edgeData.style = edgeData.style || 'stroke: #333; stroke-width: 1.5px;fill:none' edgeData.label = edge.text.replace(/
/g, '\n') } } else {