Merge pull request #3222 from leon19/bugfix/incorrect-label-padding

fix: remove right padding when a label contains HTML entities
This commit is contained in:
Knut Sveidqvist
2022-08-04 13:06:46 +02:00
committed by GitHub
2 changed files with 14 additions and 1 deletions

View File

@@ -509,4 +509,16 @@ stateDiagram-v2
expect(svg).to.not.have.attr('style');
});
});
it('v2 should render a state diagram and set the correct length of the labels', () => {
imgSnapshotTest(
`
stateDiagram-v2
[*] --> 1
1 --> 2: test({ foo#colon; 'far' })
2 --> [*]
`,
{ logLevel: 0, fontFamily: 'courier' }
);
});
});