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

[feat]: format only indent #220

Open
Scrum opened this issue Jan 24, 2018 · 2 comments
Open

[feat]: format only indent #220

Scrum opened this issue Jan 24, 2018 · 2 comments
Assignees
Milestone

Comments

@Scrum
Copy link
Member

Scrum commented Jan 24, 2018

baseb on #216 save default struct and format only indent:
input.html

<html>
<div>test 1</div>

<div>test 2</div>
</html>

output.html

<html>
  <div>test 1</div>

  <div>test 2</div>
</html>
@Scrum Scrum added this to the 0.3.0 milestone Jan 24, 2018
@Scrum Scrum self-assigned this Jan 24, 2018
@andreyvolokitin
Copy link

Preserving all formatting would be brilliant. Could this feature potentially preserve formatting like this?

input.html

<div
  class="a"
  data-attr1="a"
  data-attr2="a"
  data-attr3="a"
  data-attr4="a"
>
<i class="test">test</i>
</div>

output.html

<div
  class="a"
  data-attr1="a"
  data-attr2="a"
  data-attr3="a"
  data-attr4="a"
>
  <i class="test">test</i>
</div>

Because I guess attributes wrapping can introduce some problems. This is not critical though

@andreyvolokitin
Copy link

Though posthtml-include and posthtml-extend already print such attributes on the same line. So this is even less relevant...

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