question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Put ">" on newline when wrapping multiple attributes

See original GitHub issue

For multiple attributes that extend beyond the printWidth, I would prefer this:

<div
  attr="foo"
  attr="foo"
  attr="foo"
  attr="foo"
>bar</div>

over

<div
  attr="foo"
  attr="foo"
  attr="foo"
  attr="foo">bar</div>

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
StarpTechcommented, Dec 19, 2018

@nivv yes, the experiment of this project is to align them all together. There aren’t “wrong” formatting here. There are styles and a lot of opinions 😄 I’m trying to be productive and prettyhtml helps a lot to be in teams.

0reactions
nivvcommented, Dec 19, 2018

@StarpTech I see, I wasn’t aware. Languages differ in their style guides. This is awesome for Vue, but if I want to use this for another language the format is “wrong”. No worries though!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Wrap HTML attributes on new lines set by user when ...
Webstorm aligns attributes vertically when they're put on a new line by the user. It will align with the last attribute in the...
Read more >
overflow-wrap | CSS-Tricks
The overflow-wrap property in CSS allows you to specify that the browser can break a line of text inside the targeted element onto...
Read more >
Wrap Attribute Entry Values - Asciidoctor Docs
You can force an attribute value to hard wrap by inserting a hard line break replacement in front of the line continuation. A...
Read more >
HTML: Proposal to organize the attribute-wrapping settings ...
Current force-expand-multiline case: Force wrapping if there are more than 1 attribute, with one attribute per line, and with multi-line ending, ...
Read more >
overflow-wrap - CSS: Cascading Style Sheets - MDN Web Docs
Values · normal. Lines may only break at normal word break points (such as a space between two words). · anywhere. To prevent...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found