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

Feature request: Add option to keep element on same line if inside line width with splitMultiAttrs activated #14

Open
jansohn opened this issue Aug 16, 2024 · 0 comments

Comments

@jansohn
Copy link

jansohn commented Aug 16, 2024

We want to switch to enabling splitMultiAttrs in our projects when formatting our (X)HTML files for better readability. This is great for elements with a lot of attributes but not so great for 2-3 attributes which would easily still fit inside the same line width.

Example:

<h:outputStylesheet library="webjars" name="font-awesome/4.7.0/css/font-awesome.min-jsf.css" />

gets formatted to the following no matter the line width:

<h:outputStylesheet
  library="webjars"
  name="font-awesome/4.7.0/css/font-awesome.min-jsf.css" />

I would like to see an additional option to not split the attributes if they fit on the same line.

Change would probably need to be done somewhere here: https://github.com/eclipse-sourceediting/sourceediting/tree/master/web/bundles/org.eclipse.wst.html.core/src/org/eclipse/wst/html/core/internal/format

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

No branches or pull requests

1 participant