Fix for + and -

This commit is contained in:
Yash-Singh1
2021-08-15 17:36:26 -07:00
parent 45b1c9f32c
commit b4814d7b13
2 changed files with 6 additions and 3 deletions
+1 -1
View File
@@ -7,7 +7,7 @@ module.exports = {
"1": "{\"code\":\"graph TD\\n A[Christmas] -->|Get money| B(Go shopping)\\n B --> C{Let me think}\\n C -->|One| D[Laptop]\\n C -->|Two| E[iPhone]\\n C -->|Three| F[fa:fa-car Car]\",\"mermaid\":\"{\\n \\\"theme\\\": \\\"default\\\"\\n}\",\"updateEditor\":false,\"autoSync\":true,\"updateDiagram\":false}"
}
},
"__version": "8.2.0",
"__version": "8.1.0",
"Auto sync tests": {
"should dim diagram when code is edited": {
"1": "{\"code\":\"graph TD\\n A[Christmas] -->|Get money| B(Go shopping)\\n B --> C{Let me think}\\n C -->|One| D[Laptop]\\n C -->|Two| E[iPhone]\\n C -->|Three| F[fa:fa-car Car]\\n C --> Test\",\"mermaid\":\"{\\n \\\"theme\\\": \\\"default\\\"\\n}\",\"updateEditor\":false,\"autoSync\":false,\"updateDiagram\":false}"
+5 -2
View File
@@ -20,12 +20,15 @@ export const initEditor = (monacoEditor): void => {
'journey'
],
keywords: ['participant', 'as'],
arrows: ['---', '===', '-->', '==>', '->>', '-->>', '->', '-)', '--)', '-x', '--x'],
arrows: ['---', '===', '-->>', '-->', '==>', '->>', '->', '--)', '-)', '--x', '-x'].reduce(
(accumalator, arrow) => accumalator.concat(arrow, arrow + '+', arrow + '-'),
[]
),
tokenizer: {
root: [
[/[{}]/, 'delimiter.bracket'],
[/[a-z_$][\w$]*/, { cases: { '@typeKeywords': 'keyword', '@keywords': 'keyword' } }],
[/[-=>ox]+/, { cases: { '@arrows': 'transition' } }],
[/[-+=>ox]+/, { cases: { '@arrows': 'transition' } }],
[/[[{(}]+.+?[)\]}]+/, 'string'],
[/".*"/, 'string']
]