In an existing laravel application I'm working on, .blade.php files contain a body
section with my html and php in it. After the body
section they contain a custom_js
section which is used for inserting javascript code. In the parent template, the custom_js
section is embedded like this:
<script>
@include('custom_js')
</script>
I can't get correct syntax highlighting in my .blade.php files for my javascript code. Php and html is highlighted correctly.
If I put the javascript code inside <script>
tags the highlighting works fine and that's how the other developers have worked so far but before deployment you will have to remove these tags or else there would be 2 opening and 2 closing <script>
tags. I don't feel comfortable with changing the parent template because that would cause enourmous refactoring effort.
I've already tried setting the Template Data Language of this specific file to various languages but that didn't help.
Is there an easy way or do I have to stick with inserting and removing <script>
tags manually before deploying?
I'm using PhpStorm 8.0.3.