From db5ce6b74be9aa0953920f72dc3868238adea4fb Mon Sep 17 00:00:00 2001 From: Yash-Singh1 Date: Sun, 22 Aug 2021 09:45:46 -0700 Subject: [PATCH] block keyword highlighting and class is also a normal keyword --- src/lib/components/editor/util.ts | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/lib/components/editor/util.ts b/src/lib/components/editor/util.ts index ddc5d475..bdd764e5 100644 --- a/src/lib/components/editor/util.ts +++ b/src/lib/components/editor/util.ts @@ -51,6 +51,7 @@ export const initEditor = (monacoEditor): void => { 'link', 'callback', 'click', + 'class', 'href', 'call' ]; @@ -77,7 +78,16 @@ export const initEditor = (monacoEditor): void => { [/[ox<]?(-{2,}|-+\.+-+|={2,})[ox>]?/, 'transition'], [/[-+>]+/, { cases: { '@eatingSequenceArrows': 'transition' } }], [':::', 'transition'], - [/[a-z_$][\w$]*/, { cases: { '@typeKeywords': 'typeKeyword', '@keywords': 'keyword' } }], + [ + /[a-z_$][\w$]*/, + { + cases: { + '@typeKeywords': 'typeKeyword', + '@blockKeywords': 'typeKeyword', + '@keywords': 'keyword' + } + } + ], [/[A-Z$][\w$]*/, { cases: { '@orientation': 'keyword' } }], [/\[\[(fork|join|choice)\]\]/, 'annotation'], [/[[{(}>]+.+?[)\]}]+/, 'string'],