js-beautify
js-beautify copied to clipboard
Preserve Existing Newlines
Description
Preserve all newlines in existing HTML.
Input
With this requested feature, this input:
<body>
<!-- Some Comments --->
<!-------------- CONTAINER: GROUP CONTAINER 1 ------------------->
<span data-header="team-members" data-meta="
TITLE: Product Management
RECORDS: advisers-prod-mgmt
ITEM-CLASS: team-member
">
</span>
<hr>
</body>
Expected Output
Should give this output:
<body>
<!-- Some Comments --->
<!-------------- CONTAINER: GROUP CONTAINER 1 ------------------->
<span data-header="team-members" data-meta="
TITLE: Product Management
RECORDS: advisers-prod-mgmt
ITEM-CLASS: team-member
">
</span>
<hr>
</body>
Environment
OS: Online
Also, attributes on newlines should get indented, as shown above.
Another example. Newlines in the following should be preserved. They aren't preserved. As a result, my javascript process is broken, because it relies on those newlines.
<span hidden id="advisers-prod-mgmt">
NAME
IMG
LINK
BIO
Lana Hogue
lana-hogue.jpg
https://www.garmentindustry411.com/
is a sewn-products supply chain guru.
Faran Thomason
faran.jpg
https://about.me/faran_thomason
is a toy and video game industry veteran.
</span>
Basically, i seek an "Indent Only" beautifier.