Non breaking space at the end of the line
<p>Let's assume I have a paragraph of text. The first one shows what I have at the momment. The second one is what I would like to have. So, it's all about the words that have 3 or less letters at the end of the line. I want them to be at the begenning of the next line.</p>

<p>I could use a non breaking space entity between "tempor" and "ex" words (and so on), but this looks like a lot of job. Since there's no CSS property to handle it, I thought the only reasonable way to work it around is to use some JS to control it. So, all the HTML comes from server without non-breaking lines and then a JS code gets all the text and puts a non-breaking-space sign in the desired places. Are there any ready to use libraries to control it this was? Is this a good way to control it? Is this going to be efficient withing huge blocks of text?</p>

<p><a href="https://i.stack.imgur.com/LuYca.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/LuYca.jpg" alt="enter image description here"></a></p>