mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-10-02 13:49:37 +02:00
Creating detectors and moving out diagram specific code from the diagramAPI
This commit is contained in:
5
src/diagrams/c4/c4Detector.ts
Normal file
5
src/diagrams/c4/c4Detector.ts
Normal file
@@ -0,0 +1,5 @@
|
||||
import type { DiagramDetector } from '../../diagram-api/detectType';
|
||||
|
||||
export const c4Detector: DiagramDetector = (txt) => {
|
||||
return txt.match(/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/) !== null;
|
||||
};
|
Reference in New Issue
Block a user