mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-17 14:29:48 +02:00
Adding case check
This commit is contained in:
@@ -321,6 +321,9 @@ export const insertNode = async (elem, node, renderOptions) => {
|
|||||||
if (!shapes[node.shape]) {
|
if (!shapes[node.shape]) {
|
||||||
throw new Error(`No such shape: ${node.shape}. Please check your syntax.`);
|
throw new Error(`No such shape: ${node.shape}. Please check your syntax.`);
|
||||||
}
|
}
|
||||||
|
if (node.shape !== node.shape.toLowerCase()) {
|
||||||
|
throw new Error(`No such shape: ${node.shape}. Shape names should be lowercase.`);
|
||||||
|
}
|
||||||
if (node.link) {
|
if (node.link) {
|
||||||
// Add link when appropriate
|
// Add link when appropriate
|
||||||
let target;
|
let target;
|
||||||
|
Reference in New Issue
Block a user