Bugs in PHP/HTML mix (color codings)


Hey guys, I really love the software here but this is starting to become a common thing for me…while I know my code and how to work around it…would be nice for the highlighting to be there. :wink:

PS: I have only toggle soft wrap and PHP selected as Grammar (in regards to a “fresh install.”)

Here’s an image to describe what I’m talking about:



Can you check the detected language in bottom left corner ?
I think php support fragment of HTML but not the other way arround.


I have:



Anyone care to throw me a bone on how I could fix this for everyone? I wouldn’t mind doing the man-hours for it. (Still in college courses until April lol.)

I’m guessing it’s a regex of some sort somewhere?


It would most likely be in the language-php package that you would make the fix.


You can place your cursor in a badly colored php section.

Then invoke:
Editor: Log Cursor Scope (cmd-shift-alt-p)

If It’s html then it has guessed to wrong language and we can continue from there.

As a separate route you may check if the first line of the file looks like php.
Maybe an empty php tag before the file


Where an issue starts:

Scopes at Cursortext.html.php

I tried some mspaint skills but my graphic skills are epic stick figures as you can see. :wink:


Little padding for the pics :wink:

These may be some better captures. Also, they are the first issues I see on the php page.


Screen 1

  1. [No] Maybe I have to put a . ''; in order to make the software know? I think it may be looking for the second apostrophe, after the end of the $id statement.
  2. It seems it’s not coloring the <?php part of the echo $id statement. Maybe that’s the first culprit.

And here’s another screenshot of the cursor at the <?php part.


If anyone would like to see some of the various php coding issues for themselves, I’m mostly running a vanilla install of Fluxbb software: http://fluxbb.org/downloads/ mostly every php file is like this.