[ic] Removing blank lines from source

Daniel Collis-Puro dan at endpoint.com
Fri Jul 14 16:16:24 EDT 2006

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.


Daniel Collis-Puro
Software Engineer
End Point Corp.
dan at endpoint.com
(office) 781-477-0885
(cell)   781-775-1338

More information about the interchange-users mailing list