Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Like, it's part of the html specification if I'm not mistaken. It's not like HN is doing this deliberately.

Fuck. I don't even know what I'd have to do if I wanted to fake it... is there a double-width space in Unicode?



You want non-breaking spaces for this. They're the same width as a normal space, but don't collapse together in HTML.

I once encountered a bizarre bug caused by a user whose keyboard was somehow configured to automatically insert these if they added two or more sequential spaces.

https://en.m.wikipedia.org/wiki/Non-breaking_space

Unicode A0 is embedded in my mind because of that.


When you start talking sizes rather than for a purpose, most of them are "what fraction of an em are they": https://unicode-explorer.com/articles/space-characters

An "en space" (half-em) is pretty close though: https://en.m.wikipedia.org/wiki/Whitespace_character#/media/...

And web browsers muddied the water a lot, since rendering two spaces is generally done by rendering two spaces, unless you're on the web and then have to do something special (some people do!   is pretty common). Personally I think this alone is the biggest influence that trained generations that one space is the majority and therefore the most correct.

---

I wish they called the zero-width spaces "non-space", so we could have both   (non-breaking space) and &zwsp; (breaking non-space).





Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: