Blackfriday extension for "widont" functionality

Widont is a common practice in blogging/CMS world that prevents a situation where a line break happened and there’s only one world at the end.

For example, a title or paragraph with a line break like this doesn’t look good:

Welcome to my really cool

What widont extensions do is to replace the last space with   (non-breaking space character) so that the last two words will share the same fate:

Welcome to my really
cool blog!

Is there a way to do this on Hugo? I read the Blackfriday extensions, but can’t find anything relevant:

1 Like

Looks like it’s possible with JS