Insert non-breaking spaces
Glues numbers to their units so a line break cannot split them.
Result
Why you would use this
A value orphaned from its unit at the end of a line — "10" here, "km" on the next — is the classic typographic wince. The non-breaking space (U+00A0) looks identical and refuses to break. It goes between a number and what follows it, and after a single-letter word — which is where a break reads worst.