【问题标题】:How to comment html code with comments in Visual studio如何在 Visual Studio 中使用注释来注释 html 代码
【发布时间】:2019-09-05 13:04:34
【问题描述】:

我有代码:

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

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

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

</html> 
-->

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

 <!-- some comment -->

如何在html中用cmets注释大块代码?

【问题讨论】:

  • 我认为手动删除任何过早的评论终止符 (--&gt;) 是唯一的方法,可悲的是:(
  • 可以使用快捷键 ctrl + k , ctrl + c

标签: html visual-studio-code


【解决方案1】:

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

【讨论】:

  • 我看不出这个答案与问题有什么关系。
猜你喜欢
  • 2020-08-26
  • 2021-10-01
  • 2016-09-15
  • 2011-04-14
  • 2021-08-25
  • 1970-01-01
  • 2014-01-13
  • 2017-12-28
  • 2016-08-06
相关资源
最近更新 更多