visual-studio-code - Visual Studio Code HTML 错误注释类型

标签 visual-studio-code

我最近使用 VS 代码进行 Wordpress 开发,但是当我用 (ctrl+/) 注释一个 html 元素时遇到了一个奇怪的错误。而不是评论( <!-- --> )它使用( // )作为我的 html 代码?有没有人经历过这个?您知道将评论更改为正确的 html 评论的任何解决方案吗?

Animated GIF

最佳答案

这是由 VS Code 不正确地自动检测到的编程语言造成的 - 在 GIF 的右下角,您可以清楚地看到,VS Code 设置为 HTML。单击该按钮,然后切换到 JavaScript( react )问题应该得到解决。

关于visual-studio-code - Visual Studio Code HTML 错误注释类型,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44858100/

相关文章:

javascript - Visual Studio Code 中是否有 "immediate window"来运行 Javascript?

gulp - 如何使用键盘快捷键运行 Gulp 任务

java - Firebase 网络问题?

websocket - 错误 : Error when readinrror: Error when reading 'bin/main.dart' : The system cannot find the path specified

c++ - vscode g++ 链接失败 : Undefined symbols for architecture x86_64

macos - 在 VSCode 中创建多个终端并运行命令

flutter - 如何在 flutter 时禁用自动热重载?

c - 在C中: File Not Found Error When using readInputFile function for a second time on fclose()

node.js - VSCode Node : Debugger not stopping at breakpoint (WSL2/Ubuntu18)

visual-studio-code - VSCode 和 clang 格式 : use my own file extension