- From: Fuqiao Xue <xfq@w3.org>
- Date: Fri, 20 Jan 2023 09:46:03 +0800
- To: "Chris Blume (ProgramMax)" <programmax@gmail.com>
- Cc: public-png@w3.org
Hello Chris, One option might be using the Nu Html Checker[1]. It doesn't support tidying the document, but it can catch unintended mistakes like mismatched closing tags. You can also use spec-prod[2] to integrate it into your workflow. hth, Fuqiao [1] https://github.com/validator/validator [2] https://github.com/w3c/spec-prod/blob/main/docs/examples.md#run-as-a-validator-on-pull-requests On 2023-01-19 14:22, Chris Blume (ProgramMax) wrote: > Hello everyone, > > Our meeting on Jan 23rd will likely be short and sweet. The only topic > to discuss which I am aware of is: Are we satisfied with HTML Tidy? > > On one hand, it solves a real problem we've run into before. We once > had mismatched closing tags, which HTML Tidy catches. I do want > tooling to help us catch mistakes before they are merged in. > > But on the other hand, HTML Tidy is not idempotent. As a result, it is > the source of significant noise. When I made a change to one part of > the document, HTML Tidy suddenly wanted a change in a totally > unrelated part of the document. If I run it twice in a row, it wants > different formatting after the formatting it just applied. HTML Tidy > needlessly complicates pull requests. Worse, it conflates unrelated > changes in one pull request. > > We could contribute to HTML Tidy [1] to improve its shortcomings. We > have already improved other tools (for example, ReSpec) in our journey > on the PNG spec. This is a tempting option because we could get the > perfect tool for us. > > I took a glance at the HTML Tidy source code. I am not convinced the > fixes we would want are simple enough that they will be done quickly. > So even if we chose this route, we would still struggle against our > tooling for a while. > > I think a better option is to remove the HTML Tidy tooling for now. It > simply isn't the magical tool we want yet. > > I previously looked at Prettier [2], which is another HTML formatter > used by other W3C projects. It is strongly opinionated (read: not > customizable) and those hard-coded opinions don't align well to our > needs. > > I would like your thoughts on this. > Should we continue using HTML Tidy to help us catch important > mistakes? > Should we perhaps also spend more time investigating why we are > struggling with it? Perhaps we're using it wrong. > Should we remove it? Replace it? > > I'll see you all this coming Monday where we can share our thoughts. > > Links: > ------ > [1] https://github.com/htacg/tidy-html5 > [2] https://prettier.io/
Received on Friday, 20 January 2023 01:46:05 UTC