Fix for new diagram types

This commit is contained in:
Knut Sveidqvist
2020-05-17 10:15:44 +02:00
parent 71afa0a818
commit 0a99d391c7
2 changed files with 4 additions and 1 deletions
+3
View File
@@ -28,6 +28,9 @@ const detectType = text => {
if (text.match(/^\s*gitGraph/)) {
return 'git';
}
if (text.match(/^\s*flowchart/)) {
return 'flowchart';
}
if (text.match(/^\s*info/)) {
return 'info';
+1 -1
View File
@@ -4,7 +4,7 @@ export const initEditor = monaco => {
// Register a tokens provider for the language
monaco.languages.setMonarchTokensProvider('mermaid', {
typeKeywords: [
'graph', 'stateDiagram', 'sequenceDiagram', 'classDiagram', 'pie'
'graph', 'stateDiagram', 'sequenceDiagram', 'classDiagram', 'pie', 'flowchart', 'gantt'
],
keywords: [
'patricipant','as'