htacg / tidy-html5

The granddaddy of HTML tools, with support for modern standards
http://www.html-tidy.org
2.71k stars 414 forks source link

Document --tidy-mark flag in tidy --help #1109

Open mnemnion opened 4 months ago

mnemnion commented 4 months ago

I have no objection to your choice to insert <meta name="generator"... into tidied files. It's questionable whether what tidy does is "generation", but including a slug naming your software as a default is reasonable.

I do think you should document the --tidy-mark flag under processing directives.

Something like this:

--tidy-mark yes|no    omit or produce a meta tag indicating the use of tidy. Defaults to yes.

I would also argue that --quiet should include --tidy-mark no. It definitely meets the criteria for "nonessential output".

But documenting that it's possible to remove this would be the bare minimum. All your program is doing in my pipeline is indentation, and calling that "generation" is inappropriate.

ler762 commented 4 months ago

I do think you should document the --tidy-mark flag under processing directives. Something like this: --tidy-mark yes|no omit or produce a meta tag indicating the use of tidy. Defaults to yes.

On my system a 'man tidy' has this bit:

   ‐‐tidy‐mark Boolean (yes if unset)
          This  option  specifies if Tidy should add a meta element to

the document head to indicate that the document has been tidied.

          Tidy won’t add a meta element if one is already present.
Is it really necessary to have the hyphens in the man page be unicode hyphens instead of hyphen/minus signs that are easy to search for? $ echo ‐‐tidy‐mark | od -tcx1 0000000 342 200 220 342 200 220 t i d y 342 200 220 m a r e2 80 90 e2 80 90 74 69 64 79 e2 80 90 6d 61 72 0000020 k \n 6b 0a $ echo - | od -tcx1 0000000 - \n 2d 0a

Message ID: @.***>

chrispy-snps commented 4 months ago

I agree with both suggested changes (document the option in the usage, and replace all Unicode-encoded hyphens with simple ASCII hyphens in the man page).