Quote:
Originally Posted by Brad
Sadly, in this case, yes.
If you ever discover a way around that, let me know!
|
Like I said two posts before this post of yours I'm replying to: the answer is to run a formatting script that makes a non-whitespaced copy of your nice-to-edit, whitespaced HTML before publishing. The browsers don't care if it is a jumbled mess.
In pseudocode:
Code:
take the html file text
split into sections of text not between tags, and text between tags
for sections not between tags
strip all whitespace
done
I believe anyone who has ever parsed XML with Perl, Python or similar fast-to-use language would do this in fifteen minutes. Sadly, I haven't.
I did a little surfing and am now assured that the problem (ignoring whitespace that is not inside tags) is simply impossible to fix inside HTML/CSS, because in HTML the linebreak is as significant as the letter 'a'. Neither can be stripped out with CSS. This problem wouldn't exist in CSS formatted XML, because between-tags whitespace means nothing in XML.
CSS3 drafts contain something to strip out whitespace but CSS3 is a long way to the future and drafts are... just that.