Narc0t1CYM
Narc0t1CYM

Reputation: 632

Jquery code makes all the previous PHP syntax highlighting faulty [Sublime Text 3]

I've just updated my Sublime Text to the latest version and thus my syntax highlighting with a PHP file which has jQuery and/or native JavaScript in it ends up faulty.

Without jQuery, only with PHP it looks fine, but as soon as I add in any JS it brakes:

enter image description here

I'm suspecting it's because of the jQuery's $ selector.

My installed packages are:

Upvotes: 0

Views: 33

Answers (1)

OdatNurd
OdatNurd

Reputation: 22791

Edit: 02/25/2018

The issue referenced below has now been solved by the maintainers of the package (see PR #705 in the official repository) and should no longer be an issue.


There is an open issue in the Microsoft TypeScript repository regarding this particular problem. It cropped up fairly recently and has been reported a fair bit, both in the official forums, here on Stack Overflow and on the unofficial Discord channel.

At the moment I don't think that there has been any official response yet, but it seems as if a recent update has changed how it interacts with code that makes it lint code that it shouldn't (such as raw HTML for example) and think that it's invalid.

Disabling the package will solve the problem while the issue is resolved, if you're not currently working with anything TypeScript related directly in the interim.

Upvotes: 1

Related Questions