mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-24 09:49:46 +02:00
fix: double space in wrapped sequence diagram messages
This commit is contained in:
@@ -567,7 +567,7 @@ export const wrapLabel: (label: string, maxWidth: number, config: WrapLabelConfi
|
|||||||
if (common.lineBreakRegex.test(label)) {
|
if (common.lineBreakRegex.test(label)) {
|
||||||
return label;
|
return label;
|
||||||
}
|
}
|
||||||
const words = label.split(' ');
|
const words = label.split(' ').filter(Boolean);
|
||||||
const completedLines: string[] = [];
|
const completedLines: string[] = [];
|
||||||
let nextLine = '';
|
let nextLine = '';
|
||||||
words.forEach((word, index) => {
|
words.forEach((word, index) => {
|
||||||
|
Reference in New Issue
Block a user