Hacker News new | ask | show | jobs
by roel_v 5693 days ago
Looks like HN does remove double spaces, what I meant was obviously s/[space][space]/[space]/g :)
1 comments

It's not HN, it's a feature of HTML. All whitespace characters (including tabs and newlines) are condensed to a single space, and leading/trailing spaces are removed. So if you have a habit of double-spacing after sentences, HTML simply ignores you, unless you use <pre> or &nbsp;.
Ah didn't know that. Well that would make the single/double space encoding of an id much harder.
Actually, it makes it more effective if anything. The browser displays it as a single whitespace, but the source isn't altered, (and therefore easily checkable).
Yeah but if a user copy/pastes it from his email client into his blog posting system, the double spaces are stripped, too (I checked it with Firefox, maybe other browsers work differently). It would only work I think if the single/doubles space pattern was preserved across copy/paste operations.