1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-03 07:55:36 +00:00

fix codemirror shell highlight (#6986)

This commit is contained in:
Michael An
2024-11-01 16:52:36 +08:00
committed by GitHub
parent 4d0b95f703
commit d2fe01473c

View File

@@ -4,6 +4,7 @@ import { cpp } from '@codemirror/lang-cpp';
import { java } from '@codemirror/lang-java';
import { shell } from '@codemirror/legacy-modes/mode/shell';
import { html } from '@codemirror/lang-html';
import { StreamLanguage } from '@codemirror/language';
import { loadLanguage } from '@uiw/codemirror-extensions-langs';
import { Utils } from '../../utils/utils';
@@ -21,7 +22,7 @@ export const getLanguageExtensions = (fileExt) => {
case 'java':
return [java()];
case 'shell':
return [shell()];
return [StreamLanguage.define(shell)];
case 'html':
return [html()];
default: