I am using Sublime Text 3, build 3114. It should be the latest version available today. Before installing this update, the JavaScript code was highlighted correctly when using PHP in this context. Now I am losing all the syntax highlight functions for JavaScript unless I close and re-open the tag <script>
in the flow.
Here is a screen shot of the issue I'm having (I just wrote a few random lines to give the idea):
The last call of the removeClass
method in the function myFuncTwo
has lost the syntax highlighter because I used <?php echo $id; ?>
in the line above. Any lines of JS code below the PHP, even outside the JS function, will not be highlighted. If I closed the </script>
tag and I re-opened it, the syntax highlighter would start working again.
Has anyone faced this issue? Is there anything I can do for the PHP Highlighter? I haven't modified any theme files and I am using the default theme Twilight. Also, the syntax highlighting is set to PHP because the file contains mostly PHP code, JS and HTML. If I set it to 'JavaScript', then the syntax highlighter would ignore the PHP code by giving it the green color of "test" there in that line.
Thanks a lot for sharing your thoughts!