VS Code 将所有 html 文件默认为 Django 模板并以错误的方式对其进行注释(如果我按 ctrl + /)

Ahm*_*ssy 3 html visual-studio-code

VS Code 将所有 html 文件默认为 Django 模板并以错误的方式对其进行注释(如果我按 ctrl + /)

即它通过添加 {% comment %} & {% endcomment %} 而不是正确的 html 注释来注释普通的 html 文件 <!-- -->

Vin*_*rth 8

转到:文件 -> 首选项 -> 设置并将此行添加到您的用户设置

"files.associations": {
    "*.html": "html"
}
Run Code Online (Sandbox Code Playgroud)