I'm looking for a general solution (if it exists) to a relatively simple problem, which is this:
I have some text which includes hyphens and periods, which I don't want to break onto multiple lines. I don't want to use the <nobr> tag, as it has long been deprecated. Let's use example-website.com as an example.
Now, the hyphens are easy enough to fix - there is a non-breaking hyphen character in Unicode. However, no such equivalent exists for periods. And ideally, I'd be interested in a general solution that doesn't involve me using loads of Unicode every time I want to include this type of string.
I suspect the answer may actually lie somewhere around creating a span and styling it, but I don't know what exact method would work (for example, AFAIK the white-space attribute doesn't handle anything other than spaces).