davidmerfield / Typeset

An HTML pre-proces­sor for web ty­pog­ra­phy

Home Page:https://typeset.lllllllllllllllll.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add support for avoiding widows

ajbouh opened this issue · comments

I would like to avoid the last 2 words in a paragraph from appearing on the last line by themselves.

For now I've been hacking around this by manually wrapping the last few words in a with a class that typeset is configured to ignore (to avoid soft-hyphens) and manually replacing spaces between those words with  .

Was this functionality intentionally omitted? If not, I'm happy to take a shot at implementing it myself.

@davidmerfield Any thoughts here?

Hi! Sorry for the massive delay here. This functionality was not intentionally avoided. I'd be happy to accept a pull request adding this. I've added this to the to-do.

hi guys, I'm an author of string-remove-widows and Detergent.js, I was wondering, what's the status of this ticket?

I can help.

I'm into automated tooling, I rewrote whole apostrophes chapters of both Butterick and Oxford's A-Z Grammar and Punctuation on string-apostrophes. We're taking the copy processing very seriously in client-work and Typeset seems to take it to another level. I've just discovered it (quite late but better late than never). How awesome would it be if we had ALL typography issues fixed at once, in one program!

Back on the subject, @danielhaim1 if you're not done with the feature yet and do need help, let's regroup and code up the widow removal!