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

An HTML formatter that allows following Vue.js Style guide? #958

Closed
thedamon opened this issue Nov 7, 2018 · 2 comments
Closed

An HTML formatter that allows following Vue.js Style guide? #958

thedamon opened this issue Nov 7, 2018 · 2 comments

Comments

@thedamon
Copy link

thedamon commented Nov 7, 2018

Problem

There are a lot of great things about pretty-html.. it's the only HTML formatter I've found so far that actually does the right thing with trailing > tags when wrapping attributes without going crosseyed looking at confusing config settings, for example.

BUT

Because it is based on print-width and has no options for (and no intent to add) wrapping HTML elements based on the number of attributes, we can't write code to the specifications of the Vue.js styleguide (which is a well-considered recommendation because whitespace matters in HTML and its structure is more rigid than js).

Reproducible Case

This is really an issue around prettyhtml and finding the best HTML formatting for vetur. I raised an issue around wrapping per attribute number instead of line length here, and the general opinion seems to be that line length is the right way to format HTML even though it breaks HTML in other situations as well.

@StarpTech
Copy link
Contributor

Hi @thedamon your proposal Prettyhtml/prettyhtml#45 was accepted and released! The bug Prettyhtml/prettyhtml#65 was fixed as well.

@octref
Copy link
Member

octref commented Nov 20, 2018

Seems this will be fixed by upgrading the prettyhtml version for #945. Cheers.

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

3 participants