mirror of
https://github.com/mickael-kerjean/filestash
synced 2025-12-31 21:03:11 +01:00
fix (editor): php code highlight
without this, we'd run onto either non highlighting of the code and / or
this error:
type: Error
message: Cannot read properties of undefined (reading 'prev')
trace: TypeError: Cannot read properties of undefined (reading 'prev')
at Object.dispatch [as token] (http://localhost:8334/assets/g5b7268/lib/vendor/codemirror/mode/php/php.js:187:32)
at readToken (http://localhost:8334/assets/g5b7268/lib/vendor/codemirror/lib/codemirror.js:1183:24)
at runMode (http://localhost:8334/assets/g5b7268/lib/vendor/codemirror/lib/codemirror.js:1240:36)
at highlightLine (http://localhost:8334/assets/g5b7268/lib/vendor/codemirror/lib/codemirror.js:1086:5)
at getLineStyles (http://localhost:8334/assets/g5b7268/lib/vendor/codemirror/lib/codemirror.js:1130:20)
at buildLineContent (http://localhost:8334/assets/g5b7268/lib/vendor/codemirror/lib/codemirror.js:1771:40)
at getLineContent (http://localhost:8334/assets/g5b7268/lib/vendor/codemirror/lib/codemirror.js:2161:12)
at buildLineElement (http://localhost:8334/assets/g5b7268/lib/vendor/codemirror/lib/codemirror.js:2243:17)
at patchDisplay (http://localhost:8334/assets/g5b7268/lib/vendor/codemirror/lib/codemirror.js:4264:20)
at updateDisplayIfNeeded (http://localhost:8334/assets/g5b7268/lib/vendor/codemirror/lib/codemirror.js:4171:5)
This commit is contained in:
parent
64a44415bf
commit
f57ba94d71
1 changed files with 1 additions and 0 deletions
|
|
@ -1,3 +1,4 @@
|
|||
import "./clike.js";
|
||||
import "../../../lib/vendor/codemirror/mode/php/php.js";
|
||||
window.CodeMirror.__mode = "php";
|
||||
export default window.CodeMirror;
|
||||
|
|
|
|||
Loading…
Reference in a new issue