Preventing single-letter words at the end of the line

In some languages, like Polish & Czech there is a rule to not leave
single-letter words at the end of the line but to move them to the next
one. We usually call these ones bastards or orphans (obviously a different
meaning than CSS3 orphans).

Now, preventing those "bastards" on the web is currently difficult. You
have to manually parse texts, changing all expressions like 'i weszli' to
'i&nbsp;weszli' or '<span class="nonbreak">i weszli</span>'. You're
half-happy if these texts come from your own database as you can prepare
them beforehand (though it's still a tedious work); it's worse if you take
them from some API calls you have little influence over; parsing all texts
using JavaScripts can't be good for performance and it'll generate flashing
effects.

I must say that in Poland it's a very frequent request from clients to
eliminate "bastard" words, a taks which - due to the above - makes for more
messy code and lots of problems. A pure CSS solution would be very
appreciated.

I'm sorry if this was already discussed, I couldn't find anything.

-- 
Regards,
Michał Z. Gołębiowski

Received on Friday, 28 December 2012 23:45:23 UTC