mirror of
https://github.com/open-webui/open-webui
synced 2025-05-23 06:14:25 +00:00
Merge pull request #12545 from mogorman/elixir_syntax_highlighting
feat: add Elixir highlighting
This commit is contained in:
commit
ddec6cf0fa
19
package-lock.json
generated
19
package-lock.json
generated
@ -29,6 +29,7 @@
|
|||||||
"async": "^3.2.5",
|
"async": "^3.2.5",
|
||||||
"bits-ui": "^0.19.7",
|
"bits-ui": "^0.19.7",
|
||||||
"codemirror": "^6.0.1",
|
"codemirror": "^6.0.1",
|
||||||
|
"codemirror-lang-elixir": "^4.0.0",
|
||||||
"codemirror-lang-hcl": "^0.0.0-beta.2",
|
"codemirror-lang-hcl": "^0.0.0-beta.2",
|
||||||
"crc-32": "^1.2.2",
|
"crc-32": "^1.2.2",
|
||||||
"dayjs": "^1.11.10",
|
"dayjs": "^1.11.10",
|
||||||
@ -4625,6 +4626,15 @@
|
|||||||
"@codemirror/view": "^6.0.0"
|
"@codemirror/view": "^6.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/codemirror-lang-elixir": {
|
||||||
|
"version": "4.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/codemirror-lang-elixir/-/codemirror-lang-elixir-4.0.0.tgz",
|
||||||
|
"integrity": "sha512-mzFesxo/t6KOxwnkqVd34R/q7yk+sMtHh6vUKGAvjwHmpL7bERHB+vQAsmU/nqrndkwVeJEHWGw/z/ybfdiudA==",
|
||||||
|
"dependencies": {
|
||||||
|
"@codemirror/language": "^6.0.0",
|
||||||
|
"lezer-elixir": "^1.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/codemirror-lang-hcl": {
|
"node_modules/codemirror-lang-hcl": {
|
||||||
"version": "0.0.0-beta.2",
|
"version": "0.0.0-beta.2",
|
||||||
"resolved": "https://registry.npmjs.org/codemirror-lang-hcl/-/codemirror-lang-hcl-0.0.0-beta.2.tgz",
|
"resolved": "https://registry.npmjs.org/codemirror-lang-hcl/-/codemirror-lang-hcl-0.0.0-beta.2.tgz",
|
||||||
@ -7611,6 +7621,15 @@
|
|||||||
"node": ">= 0.8.0"
|
"node": ">= 0.8.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/lezer-elixir": {
|
||||||
|
"version": "1.1.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/lezer-elixir/-/lezer-elixir-1.1.2.tgz",
|
||||||
|
"integrity": "sha512-K3yPMJcNhqCL6ugr5NkgOC1g37rcOM38XZezO9lBXy0LwWFd8zdWXfmRbY829vZVk0OGCQoI02yDWp9FF2OWZA==",
|
||||||
|
"dependencies": {
|
||||||
|
"@lezer/highlight": "^1.2.0",
|
||||||
|
"@lezer/lr": "^1.3.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/lightningcss": {
|
"node_modules/lightningcss": {
|
||||||
"version": "1.29.1",
|
"version": "1.29.1",
|
||||||
"resolved": "https://registry.npmjs.org/lightningcss/-/lightningcss-1.29.1.tgz",
|
"resolved": "https://registry.npmjs.org/lightningcss/-/lightningcss-1.29.1.tgz",
|
||||||
|
@ -73,6 +73,7 @@
|
|||||||
"bits-ui": "^0.19.7",
|
"bits-ui": "^0.19.7",
|
||||||
"codemirror": "^6.0.1",
|
"codemirror": "^6.0.1",
|
||||||
"codemirror-lang-hcl": "^0.0.0-beta.2",
|
"codemirror-lang-hcl": "^0.0.0-beta.2",
|
||||||
|
"codemirror-lang-elixir": "^4.0.0",
|
||||||
"crc-32": "^1.2.2",
|
"crc-32": "^1.2.2",
|
||||||
"dayjs": "^1.11.10",
|
"dayjs": "^1.11.10",
|
||||||
"dompurify": "^3.1.6",
|
"dompurify": "^3.1.6",
|
||||||
|
@ -98,6 +98,16 @@
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
languages.push(
|
||||||
|
LanguageDescription.of({
|
||||||
|
name: 'Elixir',
|
||||||
|
extensions: ['ex', 'exs'],
|
||||||
|
load() {
|
||||||
|
return import('codemirror-lang-elixir').then((m) => m.elixir());
|
||||||
|
}
|
||||||
|
})
|
||||||
|
);
|
||||||
|
|
||||||
const getLang = async () => {
|
const getLang = async () => {
|
||||||
const language = languages.find((l) => l.alias.includes(lang));
|
const language = languages.find((l) => l.alias.includes(lang));
|
||||||
return await language?.load();
|
return await language?.load();
|
||||||
|
Loading…
Reference in New Issue
Block a user