Skip to content

Commit

Permalink
fix codemirror shell highlight (#6986)
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael18811380328 authored Nov 1, 2024
1 parent 4d0b95f commit d2fe014
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion frontend/src/components/seafile-codemirror/languages.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand All @@ -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:
Expand Down

0 comments on commit d2fe014

Please sign in to comment.