in reply to Re^2: Regular Expressions
in thread Regular Expressions

OT: excellent regex point, but OP's html fu could stand some help: leftmargin is/was IE specific (some other browsers honor it; some don't) and arguement '0' should be double quoted.

And re specific example, space between "red" and > is also naughty... (but I can see how the string could -- real world -- include '\n's, I'm skeptical that spreading it out over multiple lines enhances readability.

<UPDATE ++ davidrw, below, re use of JS or TT! Again proving adage that one should put brain in gear before opening mouth. Thanks!

Replies are listed 'Best First'.
Re^4: Regular Expressions
by davidrw (Prior) on Jun 20, 2005 at 15:29 UTC
    good points.. I almost commented on the double quotes, too.. and y, css can handle the margin stuff..

    As for \n's inside the <body ... > opening tag, here's a couple trivial examples that illustrate the types of cases that i've done that for readability (basically for javascript, and for Template Toolkit stuff):
    <body bgcolor="red" foo="bar" onLoad=" if( x = do_something() ) { do_other_js() ; } else { blah( +); }" > # TT syntax: <body bgcolor="red" foo="bar" [% IF use_js %] onLoad=" ... " [% END %] >