2017-09-24 19 views
1

나는 atom을 사용하여 코드를 포맷하기 위해 html과 atom을 작성했다. 그것은 꽤 잘 작동하지만 내 코드를 조금 지저분하게 만드는 한 가지 문제가 있습니다. 그들은 방법으로 원자 아름답게 코드는 여기atom beautifier html comments

<section id="hero"> 
    <div class="container"> 
    <div class="row"> 
     <div class="col-sm-8"> 

     <p>Hello world!</p> 

     </div><!--/col--> 
    </div><!--/row--> 
    </div><!--/container--> 
</section><!--/hero--> 

그리고하게됩니다 : 다음은 코드 내가이 원하는 방법입니다

당신이 볼 수 있듯이
<section id="hero"> 
    <div class="container"> 
    <div class="row"> 
     <div class="col-sm-8"> 

     <p>Hello world!</p> 

     </div> 
     <!--/col--> 
    </div> 
    <!--/row--> 
    </div> 
    <!--/container--> 
</section> 
<!--/hero--> 

, 그것은에서 HTML 코멘트를두고 새로운 줄 그리고 난 내 코드에 불필요한 줄이 너무 쉽게 즉시 닫는 태그를 볼 수 없습니다. 미화를 구성 할 방법이 있습니까?

+0

정규식을 사용하여 줄 바꿈이있는 경우 줄 바꿈을 제거한 다음 줄 바꿈을 제거하십시오 – MCMastery

답변

0

해결 방법이 없습니다. atom-beautify 패키지를 사용하면 다양한 방법으로 구성 할 수 있습니다. 그 중 하나는 adding tags to be excluded from formatting입니다. 그러나 배열에 "!--/col--"을 추가하여 테스트하면 스 니펫의 전체 백엔드가 포맷되지 않은 것입니다.

<section id="hero"> 
    <div class="container"> 
     <div class="row"> 
      <div class="col-sm-8"> 

       <p>Hello world!</p> 

      </div> 
      <!--/col--> 
    </div><!--/row--> 
    </div><!--/container--> 
</section><!--/hero-->