mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-14 04:49:44 +02:00
fix: do not alter line breaks when drawing text
This commit is contained in:
@@ -21,9 +21,7 @@ export const drawRect = function(elem, rectData) {
|
||||
export const drawText = function(elem, textData) {
|
||||
let prevTextHeight = 0,
|
||||
textHeight = 0;
|
||||
const lines = textData.wrap
|
||||
? textData.text.split(common.lineBreakRegex)
|
||||
: [textData.text.replace(common.lineBreakRegex, ' ')];
|
||||
const lines = textData.text.split(common.lineBreakRegex);
|
||||
|
||||
let textElems = [];
|
||||
let dy = 0;
|
||||
|
Reference in New Issue
Block a user