Skip to content

Commit

Permalink
Merge pull request #5649 from mermaid-js/fix/wrap-double-space
Browse files Browse the repository at this point in the history
fix: double space in wrapped sequence diagram messages
  • Loading branch information
Yash-Singh1 authored Jul 17, 2024
2 parents b1b480a + 99644ba commit 5a6edf2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/mermaid/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down

0 comments on commit 5a6edf2

Please sign in to comment.