In relation to this question asked eight years ago; Break Lines by Whitespace Only
Is there a way to ensure lines of text are only broken onto a new line by whitespace — and not special characters such as ',' '?' '!' (as is seemingly the unicode standard)?
For example if I have a string;
jsyY!m,?s juqu8Tz~n j29@jak?ks9 2cz33#gg8*
Whilst there are four different 'word' strings in the above (separated by white-space), the browser breaks the line after '!' ',' or '?' in some circumstances — whereas I want the browser to treat that string of glyphs as a word in itself.
I have found the above thread asking a very similar question — in which it was agreed there is no way to achieve what I want without wrapping parts of the text in elements like — which wouldn't be ideal for me as i'm generating these strings on the fly with javascript.
The question is 8 years old so I wondered if anyone knew if anything had changed in this regard? Thanks for any advice or pointers.
EDIT
This issue has been solved by iterating through the body of text in javascript, adding '' at the beginning of the string, ' ' in the place of every 'space', and at the very end of the string. This seems to stop any part of any individual word breaking and being forced onto a new line (when having its individual glyphs replaced by special characters).