mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-08-19 00:06:47 +02:00
make regex match less greedy
This commit is contained in:
@@ -11,7 +11,7 @@ const detector: DiagramDetector = (txt, config = {}): boolean => {
|
|||||||
// If diagram explicitly states flowchart-elk
|
// If diagram explicitly states flowchart-elk
|
||||||
/^\s*flowchart-elk/.test(txt) ||
|
/^\s*flowchart-elk/.test(txt) ||
|
||||||
// If a flowchart/graph diagram has their default renderer set to elk
|
// If a flowchart/graph diagram has their default renderer set to elk
|
||||||
(/^\s*flowchart|graph/.test(txt) && config?.flowchart?.defaultRenderer === 'elk')
|
(/^\s*(flowchart|graph)/.test(txt) && config?.flowchart?.defaultRenderer === 'elk')
|
||||||
) {
|
) {
|
||||||
config.layout = 'elk';
|
config.layout = 'elk';
|
||||||
return true;
|
return true;
|
||||||
|
Reference in New Issue
Block a user