
섹션에 이미 주석이 있는 경우 HTML 섹션을 주석 처리하는 데 문제가 있습니다. 이는 주석 구문의 닫는 태그가 충돌하기 때문입니다. 내 어려움을 완화할 수 있는 VS Code 확장이 있습니까?
답변1
내가 아는 한, HTML 구문(또는 SGML)이 확장을 허용하지 않기 때문에 확장이 없습니다.
예외적인 경우에만 사용해야 하는 해결 방법(수동 처리 시 예상되는 오류로 인해 경고가 표시됨)으로 다음을 사용할 수 있습니다.
<head>
<title>Garden</title>
<!-- this is some comment
<!- - this is some inner comment - ->
<!- - this is some sibling comment - ->
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta name="keywords" content="garden, home, plant">
<meta name="MS-HKWD" content="tree">
<meta name="MS-HKWD" content="pond">
<meta name="MS-HKWD" content="fish">
<meta name="MS-HKWD" content="flowers">
<meta name="MS-HKWD" content="health">
<meta name="MS-HKWD" content="health, relax">
<meta name="MS-HAID" content="botany">
this is the footer of comment -->
<link href="../design.css" rel="stylesheet" type="text/css" />
</head>
또는 다음과 같은 특수 문자를 사용할 수도 있습니다.
<!~~ this is some inner comment ~~>