I'm currently exploring ways to ensure that a line-break occurs before a link in order to prevent it from being wrapped on a new line.
To clarify, let's consider a scenario where I have a few words followed by a long link displayed on a narrow device like a phone in portrait mode. If the link is placed on the same line as the preceding text, it may need to be wrapped to avoid overflowing the container. However, by forcing a line-break before the link, there's a possibility that it may appear unwrapped on the new line (although it may still require wrapping). This method aims to avoid the need to wrap the link in many cases.
I'm uncertain how to achieve this without delving into programming code, and even then, the process remains unclear. Is this even a feasible task? Ideally, I would prefer to accomplish this using CSS.
This approach would likely involve the rendering engine recognizing the device's width and anticipating that the upcoming link may not fit without wrapping, thereby generating a line-break accordingly.