首页 > 解决方案 > 如何在 Visual Studio 中使用注释来注释 html 代码

问题描述

我有代码:

<html>
<!-- some comment -->
<div>
</html>

当我试图评论这段代码时(使用 ctrl + / )我有这个结果:

<!--
<html>
<!-- some comment -->
<div>

</html> 
-->

但我有一个错误在线,因为这一行有另一个评论:

 <!-- some comment -->

如何用 html 中的注释来注释大块代码?

标签: htmlvisual-studio-code

解决方案


我发现了问题所在。我已经安装了 twig 插件(用于 Twig php 模板引擎),这导致了评论问题。


推荐阅读