-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
HTML --wrap-attributes doesn't respect --wrap-line-length #1238
Comments
The problem is that it's checking whether it needs to wrap the attribute while going character by character ( https://github.com/beautify-web/js-beautify/blob/master/js/src/html/beautifier.js#L406 ) and it's not checking if next attribute will make the line longer than the threshold. |
I fixed it in a hacky way in this fork: triamazikamno@e935fbb |
@triamazikamno |
Is this getting implemented? It's very annoying when the following: becomes:
Even though there's plenty of space to keep it in one line |
@RenaldasK |
This is another issue that will be easier to resolve once a html parser has been developed. |
Description
The HTML attribute formatter doesn't seem to wrap attributes before the value set for
--wrap-line-length
. It does wrap them eventually, just not at the correct position.Input
Expected Output
Actual Output
Steps to Reproduce
I played with other values for
--wrap-line-length
. A value of 101 gives the expected output. Not sure why as that's partway through theheight
attribute, just before the wrap should occur.Environment
html-beautify 1.6.14
Settings
The text was updated successfully, but these errors were encountered: