Skip to content

Commit 3b5f67d

Browse files
authored
Merge pull request #6119 from NealGooch/bug/5706_block_positioning_issues_when_nesting
Fix 5706 Block Positioning when nesting and blocks span columns
2 parents 4306d6d + 8eb324e commit 3b5f67d

File tree

4 files changed

+130
-271
lines changed

4 files changed

+130
-271
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'mermaid': patch
3+
---
4+
5+
fix: correct block positioning when nested blocks span multiple columns

cypress/integration/rendering/block.spec.js

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -404,6 +404,44 @@ describe('Block diagram', () => {
404404
a
405405
b
406406
a --- b
407+
`,
408+
{}
409+
);
410+
});
411+
412+
it('BL32: nested blocks spanning columns should not overlap (issue #5706)', () => {
413+
imgSnapshotTest(
414+
`block-beta
415+
columns 4
416+
417+
block:0_0:4
418+
columns 6
419+
Example:2
420+
space:2
421+
ExampleOther:2
422+
ExampleOther:1
423+
block:0_0_0:6
424+
a b c d e f g h
425+
end
426+
end
427+
`,
428+
{}
429+
);
430+
});
431+
432+
it('BL33: rows with different heights should not overlap', () => {
433+
imgSnapshotTest(
434+
`block
435+
columns 3
436+
a:3
437+
block:group1:2
438+
columns 2
439+
h i j k
440+
end
441+
g
442+
block:group2:3
443+
l m n o p q r
444+
end
407445
`,
408446
{}
409447
);

0 commit comments

Comments
 (0)