Skip to content

Commit 30a764c

Browse files
committed
Fix: adding missing parsers.
1 parent 98ee413 commit 30a764c

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

client/package.json5

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,9 @@
5757
'@codemirror/lang-php': '^6.0.2',
5858
'@codemirror/lang-python': '^6.2.1',
5959
'@codemirror/lang-rust': '^6.0.2',
60+
'@codemirror/lang-sql': '^6.10.0',
6061
'@codemirror/lang-xml': '^6.1.0',
62+
'@codemirror/lang-yaml': '^6.1.2',
6163
'@codemirror/state': '^6.5.2',
6264
'@codemirror/view': '^6.38.6',
6365
'@mathjax/mathjax-newcm-font': '4.0.0',

client/src/CodeMirror-integration.mts

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,8 @@ import { javascript } from "@codemirror/lang-javascript";
7979
import { json } from "@codemirror/lang-json";
8080
import { python } from "@codemirror/lang-python";
8181
import { rust } from "@codemirror/lang-rust";
82+
import { sql } from "@codemirror/lang-sql";
83+
import { yaml } from "@codemirror/lang-yaml";
8284
import { Editor, init, tinymce } from "./tinymce-config.mjs";
8385

8486
// ### Local
@@ -970,9 +972,15 @@ export const CodeMirror_load = async (
970972
case "rust":
971973
parser = rust();
972974
break;
975+
case "sql":
976+
parser = sql();
977+
break;
973978
case "typescript":
974979
parser = javascript({ typescript: true });
975980
break;
981+
case "yaml":
982+
parser = yaml();
983+
break;
976984

977985
// Languages without a parser.
978986
case "json5":
@@ -981,9 +989,6 @@ export const CodeMirror_load = async (
981989
case "matlab":
982990
parser = python();
983991
break;
984-
case "sql":
985-
parser = python();
986-
break;
987992
case "swift":
988993
parser = python();
989994
break;

0 commit comments

Comments
 (0)