Sublime Forum

Syntax problem after update 3087

#1

Hi all
After last update, I’m having a syntax problem with php when used with html.
As u can see in image below, syntax are not colored. I tried changing themes but problem isn’t solved.

0 Likes

#2

It’s a feature. From this:

0 Likes

#3

[quote=“lastsecondsave”]It’s a feature. From this:

[/quote]

What would be the solution for the problem with inline syntax? After testing it, i see the problem is with inline syntax like showed in this image:


I understood the new changes, but can’t understand what would be the solution to work with php + html.

0 Likes

#4

Check out the latest textmate syntax. github.com/textmate/php.tmbundle

Too many editors all doing the same work.

0 Likes

#5

Adding phtml to the filetypes list will help, but it won’t fully fix the issue.

0 Likes

#6

There are some issues with one-line php syntax highlighting in this build. See the main 3087 thread.

Syntax parsing for colouring, symbol indexing etc. is undergoing some big changes at the moment. If you need stability in this area I suggest rolling back a few builds until the new features/functions have been smoothed out.

:smile:

0 Likes

#7

[quote=“qgates”]There are some issues with one-line php syntax highlighting in this build. See the main 3087 thread.

Syntax parsing for colouring, symbol indexing etc. is undergoing some big changes at the moment. If you need stability in this area I suggest rolling back a few builds until the new features/functions have been smoothed out.

:smile:[/quote]

The old HTML syntax had phtml in its fileTypes list. It no longer does, neither does the PHP syntax.

The HTML syntax used to include the PHP syntax, it no longer does.

So phtml files don’t highlight correctly anymore. The PHP syntax should include the HTML one and have phtml files in it’s file list. You shouldn’t expect .html files to have PHP syntax highlighting.

0 Likes

#8

I made a temporary workaround:

gist.github.com/weslly/b6fdc5782fde540d0ec7

Download and save the syntax at your Packages/User/ directory to use it.

0 Likes

#9

[quote=“gerry”]

[quote=“qgates”]There are some issues with one-line php syntax highlighting in this build. See the main 3087 thread.

Syntax parsing for colouring, symbol indexing etc. is undergoing some big changes at the moment. If you need stability in this area I suggest rolling back a few builds until the new features/functions have been smoothed out.

:smile:[/quote]

The old HTML syntax had phtml in its fileTypes list. It no longer does, neither does the PHP syntax.

The HTML syntax used to include the PHP syntax, it no longer does.

So phtml files don’t highlight correctly anymore. The PHP syntax should include the HTML one and have phtml files in it’s file list. You shouldn’t expect .html files to have PHP syntax highlighting.[/quote]

Thanks for that. But the point I was really getting to was not to expect anything from a dev build with incomplete features, except something to play with, provide feedback, test out bugs etc… Jon hasn’t said all this is cast in stone, and I guess it will be worked through in subsequent builds.

0 Likes

#10

@qgates I know this. My feedback here is good. phtml,inc,tpl, etc file types need to be added to the PHP syntax and it shouldn’t be expected that .html files have highlighted php code, it’s html. Would be great if these packages were already on github.

0 Likes

#11

[quote=“gerry”]

[quote=“qgates”]There are some issues with one-line php syntax highlighting in this build. See the main 3087 thread.

Syntax parsing for colouring, symbol indexing etc. is undergoing some big changes at the moment. If you need stability in this area I suggest rolling back a few builds until the new features/functions have been smoothed out.

:smile:[/quote]

The old HTML syntax had phtml in its fileTypes list. It no longer does, neither does the PHP syntax.

The HTML syntax used to include the PHP syntax, it no longer does.

So phtml files don’t highlight correctly anymore. The PHP syntax should include the HTML one and have phtml files in it’s file list. You shouldn’t expect .html files to have PHP syntax highlighting.[/quote]

I don’t think this is the issue OP is talking about. *.php files aren’t highlighting inline php tags either. There’s a missing flag at the new PHP.sublime-syntax match regexes, probably just a converting error so I guess @jps will fix it in the next build(s).

0 Likes

#12

The PHP syntax never highlighted inline php tags. Sounds incorrect right?

PHP files were parsed with the HTML syntax. It looked they were parsed with the PHP syntax, but no. It was a trick used by ST under the hood, read the old PHP syntax comment in the header of the file.

The HTML syntax had the matchers to highlight inside the tags.

Take a look at the textmate PHP and HTML syntax commit history. The ST HTML and PHP syntaxes are v1 of those textmate syntaxes.

I understand these syntaxes very well.

0 Likes