score:0

clearly i was overthinking this. someone mentioned that for the use case above, it is sufficient to just replace the space between the final two words with a non-breaking space. (&nbsp). duh!!

example in action:

<div>this div will not have orphaned&nbsptext</div>


Related Query

More Query from same tag