Algorithm:
(1) If in 3 consecutive lines (A,B,C, left justified), line B is longer than the other 2, and moving the last word of line B to the next line (C) without line C becoming longer than the original line B, then move it.
(2) If the last word in a line is the first word of the next sentence, and its length is less than 5 characters, then put it on the next line.
In the .jpg attached , “leo” and “Et” are words to move to make the paragraph neater.