Seldaek / php-console

PHP Debug Console
Other
529 stars 91 forks source link

Syntax highlighting not working after ACE update #10

Closed enderandpeter closed 11 years ago

enderandpeter commented 11 years ago

Please see my comments in the last commit for this branch. Long story short, it would appear you'll have to use older ACE files for syntax highlighting with this project until we get to the bottom of the issue.

I meant to have less commits associated with this pull request. I'm sure I'll get the hang of this...

Seldaek commented 11 years ago

The old ace was creating problems in opera though, and since it's broken editing vs broken syntax highlighting, I prefer the current state..

enderandpeter commented 11 years ago

So, it turns out with the new ACE, to get syntax highlighting in PHP mode, you have to enclose the code in server tags, either the short or the long. One of the new features is that it will actually show you info about errors as you type. Pretty neat, actually...

shWithPHPtags

But, as a result, code with those tags won't be properly interpreted if you try to run it. Oh, we are getting somewhere, people...

In fact, if you check out the kitchen sink demo, you'll see in the PHP example that the first line only needs to be <? to trigger syntax highlighting.

highlightWithCommentedStartTag

If you simply comment out a beginning server tag as the first line of your code, it will run and highlight it just fine, it would seem. Well, that is much better. Maybe there's a way to turn that feature off or something...

staabm commented 11 years ago

php code-highliting does not work for me with the latest tag (1.3.0).

highlighting only works, when the input starts with <?php, but than posting it to the server results in a fatal error

staabm commented 11 years ago

hmm had some filesystem problems, therefore the latest version didn't work for me. after solving the filepermissions it works like expected. sorry for the noise.