fix: double space in wrapped sequence diagram messages

This commit is contained in:
Yash Singh
2024-07-16 21:25:59 -07:00
parent b1b480a13b
commit 99644bad17

View File

@@ -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) => {