Comments (4)
CVS blocks have been removed as of 76c2b57
from tidy-html5.
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.
@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
- tidylib.c - 2144 lines, 4 w/tab, 4 tabs
- sprtf.c - 440 lines, 45 w/tab, 142 tabs
- parser.c - 4898 lines, 124 w/tab, 341 tabs
- 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.
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)
- Rajab
- Error: <search> not recognized HOT 1
- `--clean` also merges nested lists (undocumented)
- tidy 5.8.0 reports version as 5.7.45 HOT 1
- Request.info
- Misleading warning for minlength attributes on input elements
- tidy-html5 Build failure on arm64-uwp
- "This document has errors" message gets "stuck" after hitting first error, when scanning multiple files
- nowrap and width attributes in <td> tag
- Stack-overflow on tidy-html5-5.8.0 HOT 2
- accessibility-check disables tidy-mark
- option "--indent-with-tabs yes" does NOT work as expected HOT 1
- can -i be performed without adding elements?
- Document --tidy-mark flag in tidy --help HOT 2
- Your website - Use HTML tidy perhaps? HOT 2
- embedded javascript is not being indented, nor is existing indentation preserved
- Display of options in help is not handling multibyte characters
- Always direct the user to the line where the crime occurred
- Warn about empty tags
- Say instead "`<` seen twice"
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tidy-html5.