![](/img/trans.png)
[英]VS Code: how to add all default snippet of HTML files into react js files?
[英]VS code default all html files to Django templates & comments them in a wrong way (if I press ctrl + /)
VS Code 将所有 html 文件默认为 Django 模板并以错误的方式对其进行注释(如果我按 ctrl + /)
即它通过添加 {% comment %} & {% endcomment %} 而不是正确的 html 注释来注释普通的 html 文件 <!-- -->
转到:文件 -> 首选项 -> 设置并将此行添加到您的用户设置
"files.associations": {
"*.html": "html"
}
对我来说,它是(Djaneiro 和其他一些 Django)扩展,它使 html 文件默认为 django 模板,因此它导致 HTML 中的注释错误(按 ctrl + / 时)(用 {% comment % 注释它们})
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.