[ic] Removing blank lines from source

Joshua Lavin josh at myprivacy.ca
Fri Jul 14 19:06:29 EDT 2006

On Jul 14, 2006, at 3:16 PM, Daniel Collis-Puro wrote:

> Grant wrote:
>> It would be nice if there were an option to have all whitespace
>> removed.  My source code probably has 3 or 4 times as much white  
>> space
>> as actual lines of code.  It's ony a problem when a human wants to
>> read it, but I am one such human.
>> Do you know if this works in 5.4:
>> Pragma no_white
>> - Grant
> Here's another idea, if you're finding that IC isn't cooperating.
> If you've got a linux/unix box available to you, you can use perl to
> collapse lines that are whitespace only.
>> From a bash shell:
> GET <your url> | perl -pe 's/^\s+$//gis' | less
> If you don't have the GET program installed (it comes as part of  
> perl's
> LWP suite of modules), you could:
> links -source <your url> | perl -pe 's/^\s+$//gis' | less
> You could probably make something analogous on windows box. Dunno.
> There are firefox plugins that will reformat HTML source on-the-fly  
> too.
> I used one a while back, but I don't remember what it was called  
> right now.

Or maybe you could even use HTML Tidy.


Josh Lavin
Kingdom Design   http://www.kingdomdesign.com/

More information about the interchange-users mailing list