W3C home > Mailing lists > Public > html-tidy@w3.org > January to March 2000

the -m switch (was: Bugs/suggestions)

From: Peter Evans <evans@i.hosei.ac.jp>
Date: Fri, 24 Mar 2000 11:45:45 -0600
To: html-tidy@w3.org
Message-ID: <OF4C9E9645.1D33B673-ON86256886.0014DD27@rfdinc.com>

Hello all.  This is the first time I've spoken up here.  And I'm pretty new
even as a lurker, so apologies if I'm retreading old ground with what

Just one (amateurish) comment on a couple of aspects of Matthew Brealey's
of putative bugs.

> Thus, where I have
> <p>
> Some <b>bold text -  accidentally missed off the '</b>'> it thinks that I wanted the boldness to span the whole of the rest of the
> document, and as a result I have to manually remove the hundreds of tags
> it adds (on one particularly extreme occasion it converted one of my
> complex and difficult to recreate) test pages into a whole load of <PRE>
> elements, and because of restrictions on the elements that can occur
> within <PRE> applied my style declarations on <BR> thereby destroying
> several hours of work).

I'm not sure whether or not this is a bug in Tidy.  Whether it is or isn't,
mind boggles at the idea of somebody who's clearly no novice running a
whose results are as radical as Tidy's to overwrite a file without first
a backup.  Surely a better way is to make a backup, or, better still, to
the -m switch and instead get Tidy to create a second file (which is what I
always do).

However, I have to say that Dave Raggett's explanation (or the 13 January
version) is slightly to blame, in that it does the extreme opposite of
Tidy users like morons.  He writes:

    I generally use the -m option to get tidy to update the
    original file. . . .

He may be wise to do that, but if so it's for the very simple reason that
ability to write decent HTML is way above that of Joe Schmoe web-page
(e.g. myself).  I'd strongly suggest rewording this bit along the following

    If you're pretty sure that your page has only the most minor
    imperfections, or if you've made a backup copy, you might
    use the -m option to get tidy to update the original file.
    But remember that tidy may work in a very unexpected
    way, producing something quite unlike what you intended.
    So I suggest that you redirect output to a second file.
    and only discard the old file when you're sure you like the
    newer one.  If you're using the Windows/MS-DOS command
    line, you'd need to write something like

    tidy -c config.txt dirtyold.htm >cleannew.htm

(NB most of us Wintel-using dumbos have either forgotten what "input and
default to stdin and stout respectively" means, or never learnt it in the
Peter Evans evans@i.hosei.ac.jp
Received on Friday, 24 March 2000 12:46:46 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:38:47 UTC