HTML editor weird comment tag behavior

Yesterday I returned to a web page project after not working on it for some time. I opened a standard HTML page and proceeding to edit it by commenting out some lines. Normally inserting line or block comments results in tags like the following:

<!-- <a id="Welcome"></a> -->

Instead I was getting tags like this:

{{/* <a id="Welcome"></a> */}}

This happened whether I was using key combo commands or from the drop-down Code menu. This same comment style appeared on my CSS documents as well. It looks like some kind of template-style comment.

I searched as best I could for an answer but couldn't find a reason why the editor was behaving this way. Since I couldn't find anything in the editor settings, I just put up with the issue and commented out stuff by hand instead. I figured it might have been part of the last update or two.

When I returned to my editor this morning I had not restarted my machine and it was the same running instance of IDEA. I simply switched windows back to it where my original document was still open.

This time the HTML comments worked normally again.

Has anyone else seen this kind of behavior? Pretty weird that it changes without a restart of any kind.


Ubuntu 16.04

IntelliJ IDEA 2019.3.4 (Ultimate Edition)
Build #IU-193.6911.18, built on March 17, 2020
Runtime version: 11.0.6+8-b520.43 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Linux 4.15.0-88-generic
GC: ParNew, ConcurrentMarkSweep
Memory: 1979M
Cores: 12
Non-Bundled Plugins: Pythonid, com.alayouni.ansiHighlight, com.intellij.ideolog, com.jetbrains.plugins.ini4idea, com.thoughtworks.gauge, de.netnexus.camelcaseplugin, mobi.hsz.idea.gitignore, org.apache.camel, org.jetbrains.plugins.go-template, org.jetbrains.plugins.go

1 comment
Comment actions Permalink

Have never faced issues like that... Must be a problem with file type - looks as if your HTML files were recognized as templates

Should the issue occur again, please select your .html file in Project tool window and hit F1 (or whatever shortcut is assigned to View | Quick documentation) - what docs are shown? Share a screenshot of this popup and your idea.log (Help | Show log in ...).


Please sign in to leave a comment.