PHP syntax highlighting bug? - Post...
When I write PHP code, I often use HTML code to format the output. The problem is, that sometimes the syntax highlighting for PHP stops working, or even changes to HTML syntax highlighting sometimes (See the images below).
I am using CoffeeCup Free HTML editor 2009 on a windows Vista Home Premium computer. I haven´t tried to recreate this on other computers, but the HTML editor keeps doing this over and over again. This error occured on the 2008 Free HTML editor too (I upgraded yesterday).
I have attached some images to help describing this problem.
Working1.png is the code in the editor directly after I´ve opened the document and scrolled down ti the right place. Working2.png shows the same code block after I have pressed enter and then deleted the empty row I created (You can see where he text marker is). The syntax highlighting disappears directly when I insert the empty row using enter.
Have anyone noticed the same problem, or have a solution for this?
Is the highlighting syntax problem also occurring in the 2009 Version?
(see attach: "badsyntax.gif")
At first I thought I'd made a mistake with some syntax and spent a while looking for my error but did not find one.
Then I saved the file and closed it to give it a try to find out where my syntaxerror would be.
The file did work without a problem, so it had to be the wright syntax.
When I reopened the file, everything was just marked fine?
(see attach: "goodsyntax.gif")
I tried to locate where it did go wrong and started over in a new file.
As you can see in attach "good-badsyntax-2", it started good in line 19 tot 22.
Starting on line 23 (with a new if-statement) it went wrong.
Is this a bug or a wrong setting in my editorsettings?
In my "Editor Options" it looks good.
Have you tried saving the file with a .php extension ?
Sorry I made a mistake.
I Indeed saved the file as: "Ledenbeheer.php"
Windows 10 PC. I have not got it installed on any other computer.
It happens repeatedly, on different files. If I tab to another opened file and back to the affected one, the highlighting reverts to being correct, until I edit it (even adding a single space).
The file has a .php extension.
Any help appreciated, as this is very annoying.
<> and != are 100% interchangeable, and there's absolutely no technical reason to use one over the other.
It's easy to overlook something you're not looking for.
This is a site I built for my work.(RSD)
This is a site I built for use in my job.(HTML Editor)
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.