From ca07ed764d64f440b8243afdbfe0d16c75261a49 Mon Sep 17 00:00:00 2001 From: Yash-Singh1 Date: Tue, 17 Aug 2021 17:01:08 -0700 Subject: [PATCH] HTML Entities --- src/lib/components/editor/util.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/lib/components/editor/util.ts b/src/lib/components/editor/util.ts index d1d5988e..847ad4b5 100644 --- a/src/lib/components/editor/util.ts +++ b/src/lib/components/editor/util.ts @@ -31,7 +31,8 @@ export const initEditor = (monacoEditor): void => { [/[a-z_$][\w$]*/, { cases: { '@typeKeywords': 'keyword', '@keywords': 'keyword' } }], [/[-+=>ox]+/, { cases: { '@arrows': 'transition' } }], [/[[{(}]+.+?[)\]}]+/, 'string'], - [/".*"/, 'string'] + [/".*"/, 'string'], + [/#(\d|[a-zA-Z])*;/, 'html.entity'] ] }, whitespace: [ @@ -48,7 +49,8 @@ export const initEditor = (monacoEditor): void => { { token: 'custom-error', foreground: 'ff0000', fontStyle: 'bold' }, { token: 'string', foreground: 'AA8500' }, { token: 'transition', foreground: '008800', fontStyle: 'bold' }, - { token: 'delimiter.bracket', foreground: '000000', fontStyle: 'bold' } + { token: 'delimiter.bracket', foreground: '000000', fontStyle: 'bold' }, + { token: 'html.entity', foreground: 'f5b436' } ] });