-
Notifications
You must be signed in to change notification settings - Fork 429
Add --doctype option to NOT MEDDLE with the doctype found in the input #435
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
Comments
OK maybe --doctype auto doesn't in fact change the doctype found. But at least the man page should say that it is guaranteed not to. Also the way the man page is written, the user might really try "--doctype user". |
P.S.,
|
@jidanni thanks for the (evolving) issue... I certainly agree, the use of Enumerate each, and file a separate issue... of course each issue should include tidy libtidy version, sample html, out html, config used, expected html, comments, etc... And absolutely agree, the present docs help, does imply So I agree, you have opened a can of worms... and that is good... separating and isolating the problems, one by one, may lead to a faster solution... Or do you have a PR for review? For sure, several |
tidy-html5 currently doesn't preserve user-supplied DOCTYPEs in output: <htacg/tidy-html5#435> Signed-off-by: Simon McVittie <smcv@debian.org>
Add a switch to make tidy promise not to change the doctype when in auto
|
Provide my case: I'm working on a few mixed doctype webpages using legacy attributes, and this particular XHTML 1.0 Transitional webpage:
the
|
Since we are about to Although I would have to say it is a little unclear exactly what is expected of tidy, so certainly need further clarification... thanks... |
There should be a way for the user to indicate to tidy,
via the command line switches, that under no circumstances it is allowed
to change the doctype found in the document. And it should use the
doctype found when deciding what content is valid or not.
Sometimes it is great that tidy decides a different doctype would be more
suitable. But sometimes it is not always great.
|
@jidanni I guess I am still very confused... tidy does not change the doctype... If you leave the So while it is agreed the documentation presently says So it seems tidy does not decide a different doctype would be more suitable, and change the output doctype, but merely shows, as an So give us an example where tidy did change the doctype, while in Otherwise this seems closed, except for improving the Or have I got something really wrong here? Pleas help... thanks... |
Fine. Then just add on the man page "The only circumstances tidy will
change the doctype found in the document are if ... ".
|
Sounds good... am adding the |
Added #614 PR to address the documentation issue. |
Addresses #435 by updating documentation.
Documentation now live as requested, so I will clear this from the queue. |
I think it is unconscionable that you have no --doctype option,
including the default (auto) that will LEAVE THE USER'S DOCTYPE ALONE NO
MATTER WHAT.
No matter what he picks, there is a danger, however slight, that the
doctype currently sitting in his input file will get changed under his
feet, behind his back, or whatever you want to call it.
Why don't you add a option to not mess with his doctype, and just print
errors against that doctype, but don't switch it for him. OK?
tidy:
Installed: 1:5.2.0-1.1
The text was updated successfully, but these errors were encountered: