mirror of
https://github.com/mickael-kerjean/filestash
synced 2025-12-19 14:56:22 +01:00
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)
4 lines
146 B
JavaScript
4 lines
146 B
JavaScript
import "./clike.js";
|
|
import "../../../lib/vendor/codemirror/mode/php/php.js";
|
|
window.CodeMirror.__mode = "php";
|
|
export default window.CodeMirror;
|