diff --git a/src/lib/components/editor/util.js b/src/lib/components/editor/util.js index e2c70d5e..079244b3 100644 --- a/src/lib/components/editor/util.js +++ b/src/lib/components/editor/util.js @@ -10,7 +10,9 @@ export const initEditor = (monaco) => { 'classDiagram', 'pie', 'flowchart', - 'gantt' + 'gantt', + 'gitGraph', + 'journey' ], keywords: ['patricipant', 'as'], arrows: ['---', '===', '-->', '==>'], @@ -20,13 +22,13 @@ export const initEditor = (monaco) => { [/[{}]/, 'delimiter.bracket'], [/[a-z_$][\w$]*/, { cases: { '@typeKeywords': 'keyword', '@keywords': 'keyword' } }], [/[-=>ox]+/, { cases: { '@arrows': 'transition' } }], - [/[\[\{\(}]+.+?[\)\]\}]+/, 'string'], - [/\".*\"/, 'string'] + [/[[{(}]+.+?[)]}]+/, 'string'], + [/".*"/, 'string'] ] }, whitespace: [ [/[ \t\r\n]+/, 'white'], - [/\%\%.*$/, 'comment'] + [/%%.*$/, 'comment'] ] });