Comment on Golden Ratio for Readable Web TypographyComments−dmerfield14yIt's difficult to trust an article on typography whose first paragraph ends with an orphan.−54mf14yShort of rewriting the copy (which they could have done, of course), dealing with orphans on the web is kind of impossible. It's a valid point, but I wouldn't let that stop you from taking the rest of the article at face value.−yesbabyyes14y[...] dealing with orphans on the web is kind of impossible.Not at all! Just: html.replace(/\s+(\S+)$/mg, " $1") EDIT: Bugfix, don't replace whitespace without any characters after, replace all occurrences in a multi-line text−54mf14yWell, yeah, but anything is possible with regex. (EXCEPT PARSING HTML, I KNOW.) I meant more along the lines of your typical HTML/CSS markup.
Comments
It's difficult to trust an article on typography whose first paragraph ends with an orphan.
Short of rewriting the copy (which they could have done, of course), dealing with orphans on the web is kind of impossible. It's a valid point, but I wouldn't let that stop you from taking the rest of the article at face value.
[...] dealing with orphans on the web is kind of impossible.
Not at all! Just:
EDIT: Bugfix, don't replace whitespace without any characters after, replace all occurrences in a multi-line textWell, yeah, but anything is possible with regex. (EXCEPT PARSING HTML, I KNOW.) I meant more along the lines of your typical HTML/CSS markup.