Skip to content

New Feature - no newlines in output #231

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

Closed
geoffmcl opened this issue Jul 18, 2015 · 5 comments
Closed

New Feature - no newlines in output #231

geoffmcl opened this issue Jul 18, 2015 · 5 comments

Comments

@geoffmcl
Copy link
Contributor

New Feature - no newlines in output

This is being developed in the issue-228 branch...

Use $ git checkout issue-228 to get it...

We have been working towards a new feature for Tidy!

Announcing the compact html output feature!

Some like vertical space for readbility in their (IDE) HTML Editor.. And there existed a classic mode which added a few more newlines to the output. The HTML is well spread out vertically... needed, loved by some...

But if we are talking about a modern html5++ aware Tidy!, then maybe a compact html mode is the best... That is the html output as nearly one line, perhaps killing some readability. But how often is the source html read by the user these days?

So in the theme that auto lets Tidy! choose the BEST output, the option --vertical-space auto will produce an output almost without any newline chars... A NEW FEATURE

Some newline chars are kept for few tags like <pre>, <style>, <script>, ... but this auto options creates the smallest possible html file for transmission over internet...

For backwards compatibily --vertical-space no and --vertical-space yes will continue to produce what they have in the past, so no need to change your config file... unless you want to take advantage of the new auto configuration option.

This started as several things, discussions -

This vertical-space is an important option, and in this branch it is now increased to three(3) modes... only auto changes anything...

For testing please $ git checkout issue-228, compile and test... unfortunately the lib.version will continue to show 5.1.2 for this branch, so take care in testing...

When tested and agreed, will be merged with master...

@geoffmcl
Copy link
Contributor Author

Added another fix #232 to this branch, bumped the version, and added a RC_NUMBER (D231) to -v output...

In a few weeks of testing so far of this issue-228 branch have not found a problem with this feature, so will consider merging it back into master in another week or so...

Testing and comments appreciated...

geoffmcl added a commit that referenced this issue Jul 31, 2015
This was evidenced by an 'assert' failure, that the type was not an 'int'!

And also in the -xml-help output, thus effecting the tidy.1 manual page
for this new feature --vertical-space auto, which produces almost single
line html output.

This 'fix' began in the issue-228 branch - see Issue #231
@geoffmcl
Copy link
Contributor Author

Pushed a small 'fix' for the -xml-help output, used in the tidy.1 man page generation...

@geoffmcl
Copy link
Contributor Author

Have been strongly testing this issue-228 branch for more than 4 weeks... and hope others have also had a chance...

For me, Tidy! remains stable in every test, and everything viewed, checked... all looks good ;=))

This included running alltest.cmd and comparing the new output to the testbase output.

Some changes, some for fixes added to master before the creation of issue-228, cause the message ouput to change, and a few change (mostly the newline count in) the html output...

The most noteable of these is the restoring of the missing summary warning when the document is detected as being html4--, and issuing a warning if in html5++ mode and there is a summary attribute... this effected about a dozen+ tests... See issue #210

And the changed treatement of pre and textarea tags, issue #228 and others, accounted for another dozen of so ouput changes...

And accepting &, issue #207 another 5, of a total of just 31 changed files, of the 447 in testbase.

What this means is that after this merge of issue-228 into master, there has to be a testbase update...

Have already experimentally done this merge and seems no conflict problems... so will get to this in the comming days, hopefully not weeks ;=().

Then these new features will be in master thus expose them to more reviewers, testers...

@geoffmcl
Copy link
Contributor Author

Found what appears to be a bug! see #238 which may hold up the merge to master...

@geoffmcl
Copy link
Contributor Author

geoffmcl commented Sep 6, 2015

Eventually got around to fully merging the issue-228 into master branch, from version 5.1.8 (2015.09.04) onward, and will at some stage delete the issue-228 development branch...

Still to update the testbase output to match, but that has nothing specifically to do with this New Feature, so will close this issue.

Look forward to everybody heavily testing this feature, and the several other fixes included at the same time...

Tidy master appears very stable and maybe it is time to consider a 5.2.0 release, perhaps after a few months, especially since I only recently got around to actually making the 5.0.0 release...

On the other hand maybe 5.1.8 includes some important bug fixes which should be put out there soonest... so should not wait too long... although, as always, it is hoped some package managers will pick up on this stable master branch for distribution...

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

1 participant