Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Script tag breaks the highlighting #55

Open
charmpitz opened this issue Mar 15, 2016 · 2 comments
Open

Script tag breaks the highlighting #55

charmpitz opened this issue Mar 15, 2016 · 2 comments

Comments

@charmpitz
Copy link

If u have a for loop inside the script tag it will break the highlighting. Try it in sublime.

Example:

<script type="text/template">
 {#Twig code here #}
</script>
@JonathanHolvey
Copy link

It doesn't need to be a loop. Any twig blocks inside the <script> tags will be scoped as a JavaScript object literal. {{ someVar }} seems to do more damage than {% if someVar %} as far as the highlighting goes.

@Pictor13
Copy link

Pictor13 commented May 9, 2019

The highlighting will break whenever there is anything than Javascript code inside the script tags.

I always been quite annoyed by that, since I often use <script> to define HTML templates.
So I made a pull request to fix that (#73 ). 😃

Give a try! (and eventually close the issue)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants