Open ghost opened 3 years ago
I found a similar issue in the Ilich CF module, but the opposite way around. I suspect they may use similar parsing logic under the hood so it might be related.
I write my CFCs in CFScript and the short-cut was commenting using HTML comments when I wanted // comments. It wasn't affecting all CFCs, only one file.
It turned out the issue was a comment in my CFC that included CFML markup:
// <cfset everything = 42>
This was way down in the file but it was enough to trick the parser into thinking the file was CFML rather than CFScript.
@KamasamaK I also am having this issue. Ctrl+\
in a scripted CFC is yielding CFML comments instead of CFScript comments. However, unlike @GeoffCapper, there are no CFM tags in my CFC. When I switched back to to the Illya Verbitskiy CFML extension, I don't have his problem (which is a shame because I like yours better :) ).
It appears that there is a bug where if component is cached then commenting out code with Ctrl-/ creates wrong comment format, this one
//
instead of this one<!--- --->
. I asked this question on SO.How to reproduce:
Make sure this
is added to
language-configuration.json
file.Try commenting out code while components are not cached. For me this worked in 2 ways:
.cfc
file, quickly add this code:and then quickly hit Ctrl-/ shortcut. It should comment out that line of code properly, like so:
A few seconds later try commenting out this line of code again - by this time component should probably be cached by extension - hit comment shortcut key again, it should comment out code in wrong fashion, like so:
Now, I understand this may not work on other peoples' machines, maybe something is wrong with my setup, maybe I am wrong about what the problem is and where it lies, but that's all I've got right now.