Giter VIP home page Giter VIP logo

Comments (4)

petdance avatar petdance commented on August 26, 2024

CVS blocks have been removed as of 76c2b57

#60

from tidy-html5.

balthisar avatar balthisar commented on August 26, 2024

I'm in favor of biting the bullet and fixing this as our last operation before merging into Master. Future PRs will be affected, so a code freeze is a pretty going point to do this, too.

from tidy-html5.

geoffmcl avatar geoffmcl commented on August 26, 2024

@petdance, @balthisar, did a quick analysis of the 52 source files, 50,352 lines, approx. 2.7MB... trying to determine what, if anything, needs 'fixing' in this regard.

Some 1.4% of the lines, 722 lines, in 34 files, have 1 or more trailing spaces. Does not seem like a giant problem ;=))

Regarding tabs, only 4 files contain tabs

  1. tidylib.c - 2144 lines, 4 w/tab, 4 tabs
  2. sprtf.c - 440 lines, 45 w/tab, 142 tabs
  3. parser.c - 4898 lines, 124 w/tab, 341 tabs
  4. tidy-int.h - 155 lines, 6 w/tab, 19 tabs

The sprtf.c is my windows ONLY debug addition, so this should not be a problem. This file is not included/compiled in the release build, and is only ever 'viewed' in my MSVC IDE which is set to display tabs as 4 spaces, so it still all lines up neatly...

parser.c is because I (or someone?) imported some code from another repo that used tabs. I did remove some, but a few remain... At 150K bytes it is the 2nd largest source file in tidy.

The largest is attrdict.c, 13,827 lines, 1.5MB, with no tabs, and only 131 lines with 1 or more trailing spaces.

But with a grand total of just 506 tabs, 0.01% of the total bytes, again it does not seem a problem.

As for relining, and indenting, having been through and through most of the source over the last few months, I have NOT seen anything noticeably bad...

In fact I LOVE that doing a big diff between cvs/sf tidy and current tidy5, there are still thousands of lines that are totally UNCHANGED. This is particular good for doing code reviews, comparison, etc...

So in summary, maybe I missed something, but I would not recommend this be done at this time.

But on the other hand, if someone wants to do this, as a PR, I would certainly look at what is about to be changed. And this is certainly the time to do it before releasing 5.0.0. But again I hope there are still thousand of lines left unchanged as mentioned above.

A feature request that I would like to pass to git is to support a -w option on the diff, but given that git is totally line oriented, I guess this would not be easily accepted. My GUI side-by-side file comparer is WinMerge, and it thankfully chooses by default to ignore pure space changes.

Anyway, just my 2 cent ;=))

from tidy-html5.

geoffmcl avatar geoffmcl commented on August 26, 2024

No further comments for over a month, so closing...

Feel free to re-open, or raise another issue... thanks.

from tidy-html5.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.