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

That appears to be his platform replacing the space+space he typed with space+nbsp.

As a fan of double spacing after sentences, in my own systems I replace space+space with nbsp+space. Attaching the non-breaking space to the previous word (opposed to the next) avoids that odd indentation behavior you've cited. Instead, it means in edge cases, the last word of a sentence might be wrapped to the next line when its width alone doesn't merit the wrap, but most readers' eyes cannot perceive that.

I've found it disappointing that HTML/CSS has no ability to specify preservation of two inter-sentence spaces while retaining conventional word-wrap semantics. I suppose in some ideal world, it would not be simply "preserve" what is typed, but "detect sentences and apply my preferred spacing," allowing adjustment by the reader in a user style-sheet.



I've found it disappointing that HTML/CSS has no ability to specify preservation of two inter-sentence spaces while retaining conventional word-wrap semantics.

You can accomplish this with CSS3 white-space:pre-wrap

http://codepen.io/anon/pen/haIFz


You can use other HTML entities, such as     which should have a wider width while wrapping as if it were a single space.




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

Search: