CM 5.25.2 - problem with using PHP closing tag


#1

Hi,

anyone has a problem with loading PHP code that contains ending tag: ?> ?

In my case, editor stops working (or refuses to load file) when ending tag is present.

Best,
Aleksandar


#2

I’m getting this errors:

php.js:220 Uncaught TypeError: state.curMode.indent is not a function
at Object.indent (php.js:220)
at indentLine (codemirror.js:7616)
at CodeMirror. (codemirror.js:7851)
at CodeMirror.indentLine (codemirror.js:3876)
at codemirror.js:6744
at runInOp (codemirror.js:3858)
at newlineAndIndent (codemirror.js:6738)
at doHandleBinding (codemirror.js:6789)
at codemirror.js:6853
at lookupKey (codemirror.js:6549)
indent @ php.js:220
indentLine @ codemirror.js:7616
(anonymous) @ codemirror.js:7851
(anonymous) @ codemirror.js:3876
(anonymous) @ codemirror.js:6744
runInOp @ codemirror.js:3858
newlineAndIndent @ codemirror.js:6738
doHandleBinding @ codemirror.js:6789
(anonymous) @ codemirror.js:6853
lookupKey @ codemirror.js:6549
lookupKey @ codemirror.js:6553
lookupKeyForEditor @ codemirror.js:6803
dispatchKey @ codemirror.js:6819
handleKeyBinding @ codemirror.js:6853
onKeyDown @ codemirror.js:6871
(anonymous) @ codemirror.js:3868
php.js:187 Uncaught TypeError: Cannot read property ‘prev’ of undefined
at Object.dispatch [as token] (php.js:187)
at readToken (codemirror.js:1665)
at runMode (codemirror.js:1722)
at highlightLine (codemirror.js:1578)
at getLineStyles (codemirror.js:1615)
at buildLineContent (codemirror.js:1840)
at getLineContent (codemirror.js:2218)
at updateLineText (codemirror.js:2226)
at updateLineForChanges (codemirror.js:2175)
at patchDisplay (codemirror.js:4274)


#3

Found error -> PHP mode depends of clike mode, so that mode need to be included too.