diff --git a/packages/codemirror/src/syntax_highlighting.ts b/packages/codemirror/src/syntax_highlighting.ts index 4637872ce..3ba507773 100644 --- a/packages/codemirror/src/syntax_highlighting.ts +++ b/packages/codemirror/src/syntax_highlighting.ts @@ -19,7 +19,7 @@ const byMimeType: Record Promise | Language "application/pgp": async () => (await import('@codemirror/legacy-modes/mode/asciiarmor')).asciiArmor, "application/sieve": async () => (await import('@codemirror/legacy-modes/mode/sieve')).sieve, "application/sparql-query": async () => (await import('@codemirror/legacy-modes/mode/sparql')).sparql, - "application/typescript": async () => (await import('@codemirror/legacy-modes/mode/javascript')).typescript, + "application/typescript": async () => (await import('@codemirror/lang-javascript')).javascript({ typescript: true }), "application/x-aspx": null, "application/x-bat": async () => (await import("./languages/batch.js")).batch, "application/x-cypher-query": async () => (await import('@codemirror/legacy-modes/mode/cypher')).cypher, @@ -35,7 +35,7 @@ const byMimeType: Record Promise | Language "text/css": async () => (await import('@codemirror/lang-css')).css(), "text/html": async () => (await import('@codemirror/lang-html')).html(), "text/jinja2": async () => (await import('@codemirror/legacy-modes/mode/jinja2')).jinja2, - "text/jsx": null, + "text/jsx": async () => (await import('@codemirror/lang-javascript')).javascript({ jsx: true }), "text/mirc": async () => (await import('@codemirror/legacy-modes/mode/mirc')).mirc, "text/tiki": async () => (await import('@codemirror/legacy-modes/mode/tiki')).tiki, "text/troff": async () => (await import('@codemirror/legacy-modes/mode/troff')).troff,