W3C home > Mailing lists > Public > html-tidy@w3.org > October to December 2000

Re: Dealing with 'pretty printing'

From: Peter Evans <evans@i.hosei.ac.jp>
Date: Tue, 21 Nov 2000 14:44:26 +0900
To: html-tidy@w3.org
Message-Id: <20001121143249.19A7.EVANS@i.hosei.ac.jp>
> What I would like to end up with is:
>         <p align="left"> 
> 	<img src="images/building.jpg"
> 	     width="350" height="129">
> 	<img src="images/index.casintranet.gif"
> 		width="247" height="37">
> 	<br>
> 
> or something close.  So I set the tidy config setting for putting attributes
> on a separate line.  What I end up with is:
> <P
>  ALIGN="left"><IMG
>  SRC="images/building.jpg"
>  WIDTH="350"
>  HEIGHT="129"><IMG
>  SRC="images/index.casintranet.gif"
>  WIDTH="247"
>  HEIGHT="37">
> <BR>
> </P>
> 
> 
> What do I need to do to get <IMG onto a line by itself?

Try a postprocessing run-through by some streaming editor instructed to
turn every instance of  "<IMG[linebreak]" into "<IMG[space]".

I believe that this sort of thing is trivial in sed, awk, or perl, but
since I'm too lazy/thick to learn any of these I'd instead use either a
macro in a text editor that handles regular expressions or a
MS-DOS/Win32 utility called SNR.
Received on Tuesday, 21 November 2000 00:51:54 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 3 April 2012 06:13:44 GMT