Sublime Forum

3114 syntax PHP in HTML bug :(

#1

Before this build everything was great because the php and html syntax worked like if it were one. Now we have problems whit the sintax.

When you try to write PHP code into a html syntax this will get ignored but nothing get fix if you change the syntax to PHP.

Here below I’m tryng to use te autocomplete of sublime but just autocomplete the word “div”, not the tag div because Sublime assume that I writing only PHP code. And even Emmet before this work perfect but you can see how Emmet is confused too and autocomplete whit PHP even when my pointer is out of the PHP tag (I supose that is for the build to, because before Emmet work fine).

I hope I made myself clear and too that this problem get fixed soon because I love sublime text :slightly_smiling:

(Sorry for my english, but I’m still learning)

1 Like

Problem syntax Highlighting (php)
#2

There’s one more syntax highlighting issue, that might be close to yours.

As you can see, HTML syntax highlighting turned off after first closing php tag (into html tag) on that line.

Affects 3114. Buid 3103 was okay.

0 Likes

#3

I’m experiencing something similar. Surely hope my beloved editor can be fixed!

If the opening bracket for the loop is removed the rendering is correct, so it’s that bracket that causes some kind of issue.

PS. I would also like “<?php" and "?>” to have the background color of other PHP code, because logically those tags are part of PHP code.

0 Likes

#4

Quick question: If you add another " after the id attribute so it closes with 2 double quotes, does the highlighting start working after that part?

I mean like this:id="<?= $item->id ?>""

0 Likes

#5

No, I think that it will be a syntax error. You need use the single quotes '.

0 Likes

#6

Sorry for my late reply. No, 2nd double quote doesn’t make it work. But i’ve got something else.
We can see that issue:


Comment cycle line… Magic!
Please note wrapped line indention level. Maybe issue somewhere around «Improved word wrap behaviour» :slight_smile:
Hope this help.

0 Likes

#7

Hi,

Same issue.
Need help.

0 Likes

#8

Please see my answer here because it also applies to the problems reported in this thread.

0 Likes