volt-sublime-textmate icon indicating copy to clipboard operation
volt-sublime-textmate copied to clipboard

Incorrect detecting of syntax highlighting

Open baldurpan opened this issue 7 years ago • 3 comments

When I create a new PHP file (f.e. index.php) and paste some php code in it which starts with <?php this plugin seems to detect it as Volt and changes the syntax to HTML (Volt).

baldurpan avatar May 13 '17 12:05 baldurpan

We work with hundreds of php files daily. For example: https://github.com/phalcon/cphalcon/tree/master/tests.

We have never faced such a problem over the last two years.

sergeyklay avatar May 13 '17 12:05 sergeyklay

Well.. uninstalling this plugin solved my problem. But as I said, this only happens when PASTING php code into a new unsaved .php file. If I type the <?php manually to the top, this doesn't happen.

baldurpan avatar May 13 '17 12:05 baldurpan

It's because of this:

https://github.com/phalcon/volt-sublime-textmate/blob/master/Volt/HTML%20(Volt).tmLanguage#L11

Removing the php part from there will resolve this.

CameronHall avatar Jun 27 '19 05:06 CameronHall