Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Preserve Existing Newlines #2125

Open
johnaweiss opened this issue Dec 13, 2022 · 1 comment
Open

Preserve Existing Newlines #2125

johnaweiss opened this issue Dec 13, 2022 · 1 comment

Comments

@johnaweiss
Copy link

johnaweiss commented Dec 13, 2022

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.

@johnaweiss
Copy link
Author

johnaweiss commented Dec 13, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants