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

Use JTidy for HTML #162

Closed
JLLeitschuh opened this issue Nov 10, 2017 · 6 comments
Closed

Use JTidy for HTML #162

JLLeitschuh opened this issue Nov 10, 2017 · 6 comments

Comments

@JLLeitschuh
Copy link
Member

It's tidy but implemented in Java. May be a very old artifact though.
https://mvnrepository.com/artifact/net.sf.jtidy/jtidy/r938

@nedtwigg
Copy link
Member

That artifact is from July 2010. HTML5, released in 2014, requires some tags to not be closed, e.g. img, input, br, hr, meta. Maybe JTidy handles these correctly?

Whether it does or not, if its useful to somebody and easy to integrate, I'm all for adding an HtmlExtension, and people can add formatters as they desire.

@fvgh
Copy link
Member

fvgh commented Apr 5, 2018

The WDT also handles HTML/JS. Adaptations for HTML 5 have been provided, but I do not now how good they are.
If you guys are interested, I can extend #230 correspondingly and call it Spotless Eclipse-WDT instead of Eclipse-XML plugin.

@fvgh
Copy link
Member

fvgh commented Apr 5, 2018

As agreed with @nedtwigg , I will provided a Eclipse-WDT instead of Eclipse-XML which will also include JS/HTML5 formatting.
This is not considered a replacement of JTidy, but an additional option.

@fvgh
Copy link
Member

fvgh commented Nov 3, 2018

@JLLeitschuh Please have a look whether #315 fixes this issue. Note that the HTML formatter should be used for XHTML and not the XML formatter. The default includes of the xml/html extensions are set accordingly.

@JLLeitschuh
Copy link
Member Author

I don't actually have a use case currently so I can't really weigh in any more.

@nedtwigg
Copy link
Member

Closing due to inactivity.

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