mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-08-22 01:36:43 +02:00
fix: fix review comments
on-behalf-of: @Mermaid-Chart <hello@mermaidchart.com>
This commit is contained in:
@@ -2,6 +2,6 @@
|
|||||||
'mermaid': patch
|
'mermaid': patch
|
||||||
---
|
---
|
||||||
|
|
||||||
fix:Add validation for blocks exceeding column width.
|
fix: Add validation for blocks exceeding column width
|
||||||
|
|
||||||
This update adds a validation check that triggers an error message when a block's width exceeds the defined column layout.
|
This update adds a validation check that triggers an error message when a block's width exceeds the defined column layout.
|
||||||
|
@@ -102,7 +102,9 @@ const populateBlockDatabase = (_blockList: Block[], parent: Block): void => {
|
|||||||
typeof block.widthInColumns === 'number' &&
|
typeof block.widthInColumns === 'number' &&
|
||||||
block.widthInColumns > column
|
block.widthInColumns > column
|
||||||
) {
|
) {
|
||||||
throw new Error(`width of block ${block.id} is greater than the column width`);
|
throw new Error(
|
||||||
|
`Block ${block.id} width ${block.widthInColumns} exceeds configured column width ${column}`
|
||||||
|
);
|
||||||
}
|
}
|
||||||
if (block.label) {
|
if (block.label) {
|
||||||
block.label = sanitizeText(block.label);
|
block.label = sanitizeText(block.label);
|
||||||
|
Reference in New Issue
Block a user