js-beautify
js-beautify copied to clipboard
Allow option to add a new line before each comment
Description
As I can see from other issues and requests here, the requirements for adding/removing line breaks before/after HTML comments are quite versatile. I for example, I wish there would be an option/switch to add "new line before comment" that also honors indentation.
Input
With this new feature, when I give like this input:
<!--begin::Card--><div class="card"><!--begin::Card Header--><div class="card-header">Header</div><!--end::Card Header--><!--begin::Card Body--><div class="card-body">...</div><!--end::Card Header--></div><!--end::Card-->
Expected Output
I'd like to see this output:
<!--begin::Card-->
<div class="card">
<!--begin::Card Header-->
<div class="card-header">
Header
</div>
<!--end::Card Header-->
<!--begin::Card Body-->
<div class="card-body">
...
</div>
<!--end::Card Body-->
</div>
<!--end::Card-->
Environment
OS: Win