While CSS has word-break
to better control display of long words, is it possible to do the reverse by preserving hyphenated words without been forcefully broken into 2 separate lines?
CodePen Demo to better illustrate the scenario.
Did you try using "non-breaking hyphen"? No CSS needed. It's a normal html entity.
Try this ‑
This is an example
Sample‑text