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

Support JSP/JSPX/XHTML with html formatter #211

Open
hazendaz opened this issue Oct 6, 2017 · 5 comments
Open

Support JSP/JSPX/XHTML with html formatter #211

hazendaz opened this issue Oct 6, 2017 · 5 comments
Assignees

Comments

@hazendaz
Copy link
Member

hazendaz commented Oct 6, 2017

No description provided.

@hazendaz hazendaz self-assigned this Oct 6, 2017
@hazendaz
Copy link
Member Author

jsoup does not handle jsp comments properly unless wrapped again in comment which makes it rather useless.

@WalterMourao
Copy link

Hi. When I format xhtml in eclipse, I suppose it is formatted using xml rules. How about a property to assign file extension with the desired rules ?

@ctubbsii
Copy link
Member

ctubbsii commented Aug 22, 2019

Hi. When I format xhtml in eclipse, I suppose it is formatted using xml rules. How about a property to assign file extension with the desired rules ?

@WalterMourao I think that is a separate issue from the one reported above.

Normally, the files you format are specified using the <includes/> and <excludes/>.

However, the html, xml, js, json, and css formatting rules are bolted on to the java formatter in somewhat of a weird way. I don't know if there's currently a way to specify the files to be formatted by those "bolted on" formatters. Ideally, this would be solved by shipping those formatters in their own maven plugin, or at the very least, as separate, configurable goals / mojos, such as what is proposed in #254 . The primary purpose of this formatter plugin is to format java source files... all other features are secondary (and probably worth considering experimental since they don't all work as well as the java one). If this is added (and I think you're right to point out that it should be), I think it should be done as part of #254.

@frettarenan
Copy link

https://github.com/Dema/jtidy-formatter-maven-plugin

@hazendaz
Copy link
Member Author

jtidy is 12 years out of date. At any rate, I wrote most of the code to support these extras. xhtml is basically html. I don't see any tangible difference and modern usage has even gotten entirely away from xhtml. (ie html 5). Anyway, I think we should just add that one as its simple bolt on to existing logic. But again I have all these done, have for years, just was not ready to bring in because other issues with the extra formatters around jsoup at the time. That stuff is long fixed so its feasible to try to bring in for next release.

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

4 participants