mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-12 13:24:52 +00:00
fix codemirror shell highlight (#6986)
This commit is contained in:
@@ -4,6 +4,7 @@ import { cpp } from '@codemirror/lang-cpp';
|
|||||||
import { java } from '@codemirror/lang-java';
|
import { java } from '@codemirror/lang-java';
|
||||||
import { shell } from '@codemirror/legacy-modes/mode/shell';
|
import { shell } from '@codemirror/legacy-modes/mode/shell';
|
||||||
import { html } from '@codemirror/lang-html';
|
import { html } from '@codemirror/lang-html';
|
||||||
|
import { StreamLanguage } from '@codemirror/language';
|
||||||
import { loadLanguage } from '@uiw/codemirror-extensions-langs';
|
import { loadLanguage } from '@uiw/codemirror-extensions-langs';
|
||||||
import { Utils } from '../../utils/utils';
|
import { Utils } from '../../utils/utils';
|
||||||
|
|
||||||
@@ -21,7 +22,7 @@ export const getLanguageExtensions = (fileExt) => {
|
|||||||
case 'java':
|
case 'java':
|
||||||
return [java()];
|
return [java()];
|
||||||
case 'shell':
|
case 'shell':
|
||||||
return [shell()];
|
return [StreamLanguage.define(shell)];
|
||||||
case 'html':
|
case 'html':
|
||||||
return [html()];
|
return [html()];
|
||||||
default:
|
default:
|
||||||
|
Reference in New Issue
Block a user