Stop VSCode from "greening out" my Dust / HTML code after "#" symbol

141 views Asked by At

I have some Dust templates that I'm looking at in VS Code. On 1 computer, if there is a "#" symbol, the code after it turns green as if it were commented out.

For instance:

<div id="someDiv">
Some text
<#someThing>
<div id="anotherDiv">
More text
</div>
</div>

Everything from "<#someThing>" down would be greened out.

What could be causing this? Since it's only happening on 1 out of 3 computers I'm running VS Code on, makes it feel like it might be some extension, but is there an easy way to tell VS Code not to do this?

3

There are 3 answers

0
TheLegend42 On

Try removing all the cosmetic extensions and adding them one by one to see what causes it.

1
CodingDog On

DustJS supports added Syntax Highlighting to any DustJS files. Maybe DustJS Syntax Highlighting set <#something> or # as a comment string or something. Here For More Info.

0
Ragnar Lothbrok On

Not sure what caused this issue in the first place, but installing the DustJS extension and changing "Language Mode" to DustJS fixed the issue. Note, I installed some other Dust extensions and had tried selecting "dust" as the language and that didn't work. Only the "DustJS" one fixed it.