mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-11 03:19:42 +02:00
Better text handling for flowcharts
This commit is contained in:
11
src/utils.js
Normal file
11
src/utils.js
Normal file
@@ -0,0 +1,11 @@
|
||||
/**
|
||||
* Created by knut on 14-11-23.
|
||||
*/
|
||||
module.exports.detectType = function(text){
|
||||
if(text.match(/^\s*sequence/)){
|
||||
return "sequence";
|
||||
}
|
||||
else{
|
||||
return "graph";
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user