- From: Grantham, Andrew <Andrew.Grantham@Cyberplex.com>
- Date: Thu, 15 Mar 2001 07:28:36 -0500
- To: "'Barney Wol'" <Barney.Wol@noctua.demon.co.uk>
- Cc: "'html-tidy@w3.org'" <html-tidy@w3.org>
- Message-ID: <35E30F8AB113D311B1D900805F9FC376172E53@TOXMAIL2>
Another thing to try would be: - Before running Tidy, Find and Replace all tabs with an HTML entity that you don't already have in your code. - Run Tidy on the resulting mess with indenting turned off. - Replace all of the entities in the resulting code with tabs again. Voila! If you use BBTidy with BBEdit on the Mac, just write a little AppleScript to do this for you. Tabs are searched for using "\t". ______________________ ANDREW GRANTHAM Interface Development Cyberplex > ---------- > From: Barney Wol > Sent: Tuesday, March 13, 2001 7:28 PM > To: html-tidy@w3.org > Subject: Re: tidy without indenting? > > At 16:22 +0900 13/3/01, Peter Evans wrote: > > > Can I use tidy while leaving the indents of my page as they were? > > > >No. The first paragraph under the subtitle "Layout style" within > >http://www.w3.org/People/Raggett/tidy/ explains not only that this isn't > >possible but also why it can't be an added feature. > > > >If you're desperate to preserve a laboriously contrived layout -- and I > >know I sometimes am -- then here is a (probably more laborious) > >workaround. Ignore Tidy's standard output and instead read its > >error/warning file (the file you specify after the "-f" switch), making > >your own corrections to the original file as appropriate. > > > Yes, I do this too. However, you have to watch out for a few > things that Tidy changes without warning you about - double quote > marks (") changed to ", apostrophes to ', and lone > ampersands (&) to &. > > While sympathising with the original request, I think it is > outside of Tidy's original remit, which is (as I understand it) to > correct an HTML file so it is legal. This necessarily entails > disassembling it, and the corrected result can only be re-created to > some defined standard, as indentation may HAVE to be changed to make > the file legal. > > I think Tidy should be treated as a "first pass" engine, and > if you want to re-edit the output to your indentation standard, then > that is up to you. Incremental code changes can then be re-checked, > errors noted, and the original files corrected by hand. As Mr.Evans > says, this is a rather laborious approach, but once done, incremental > changes are easier. > > Or, of course, you could learn to love the standard output > style adopted by Tidy. :-) > > Regards, > > Peter > >
Received on Thursday, 15 March 2001 07:23:39 UTC