mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-23 09:20:03 +02:00
chore(split): Flow type
This commit is contained in:
@@ -1,10 +1,9 @@
|
|||||||
import type { DiagramDetector } from '../../diagram-api/types';
|
import type { DiagramDetector, ExternalDiagramDefinition } from '../../diagram-api/types';
|
||||||
import type { ExternalDiagramDefinition } from '../../diagram-api/types';
|
|
||||||
|
|
||||||
const id = 'flowchart';
|
const id = 'flowchart';
|
||||||
|
|
||||||
const detector: DiagramDetector = (txt, config) => {
|
const detector: DiagramDetector = (txt, config) => {
|
||||||
// If we have confired to only use new flow charts this function shohuld always return false
|
// If we have confirmed to only use new flow charts this function should always return false
|
||||||
// as in not signalling true for a legacy flowchart
|
// as in not signalling true for a legacy flowchart
|
||||||
if (config?.flowchart?.defaultRenderer === 'dagre-wrapper') return false;
|
if (config?.flowchart?.defaultRenderer === 'dagre-wrapper') return false;
|
||||||
return txt.match(/^\s*graph/) !== null;
|
return txt.match(/^\s*graph/) !== null;
|
||||||
|
Reference in New Issue
Block a user