Sublime Forum

Bug highlight script on file html.twig

#1

Hello,
When i create this on my file .html.twig :

<script type="text/javascript">
</script>
<div></div>

My code below become yellow everywhere, same color as chain (in example

become yellow).

Thank You

0 Likes

#2

Does it happen in safe mode?

0 Likes

#3

Windows ? idk, it’s work computer, so it’s disabled.
This bug appeared after update Sublime Text last version

0 Likes

#4

The term “safe mode” always referes to ST’s safe mode, which starts ST without any plugins or user settings being active.

As you refere to “.html.twig” I guess you have a 3rd party package installed, which provides syntax highlighting for twig specific stuff? If so, SAFE MODE would just disable that plugin causing your file to be opened in plain HTML.

Which Twig package do you use? I found two:

I don’t see any issues with the latter one.

The first one may fail due the the same reason other tmLanguage syntaxes recently started to have some issues. Something with regards to how regexp patterns are interpreded seems to have changed, which breaks some of those textmate syntaxes.

0 Likes

#5

I am the author for the second package. I tried the given snippet but it highlights correctly (which doesn’t surprise me as it’s just plain HTML without any Twig related stuff). If you can paste an example snippet where the highlighting breaks (if you are using my package), I can take a look at it.

0 Likes

#6

Thanks you deathaxe and UltraInstinct05.
I used the PHP-Twing (with n, idk old version)
Now i install Twig from UltraInstinct05 and it’s work !

0 Likes