Merge pull request #5649 from mermaid-js/fix/wrap-double-space

fix: double space in wrapped sequence diagram messages
This commit is contained in:
Yash Singh
2024-07-17 18:33:33 +00:00
committed by GitHub

View File

@@ -567,7 +567,7 @@ export const wrapLabel: (label: string, maxWidth: number, config: WrapLabelConfi
if (common.lineBreakRegex.test(label)) {
return label;
}
const words = label.split(' ');
const words = label.split(' ').filter(Boolean);
const completedLines: string[] = [];
let nextLine = '';
words.forEach((word, index) => {