Skip to content

Comment on Golden Ratio for Readable Web Typographyparent

Comments

[...] 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

Well, yeah, but anything is possible with regex. (EXCEPT PARSING HTML, I KNOW.) I meant more along the lines of your typical HTML/CSS markup.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.