3 ms·
Looks like HN does remove double spaces, what I meant was obviously s/[space][space]/[space]/g :)
by roel_v 16y ago
Looks like HN does remove double spaces, what I meant was obviously s/[space][space]/[space]/g :)
- modeless 16y agoIt'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 .
- roel_v 16y agoAh didn't know that. Well that would make the single/double space encoding of an id much harder.
- grncdr 16y agoActually, 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).
- roel_v 16y agoYeah 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.