WordPress-iOS icon indicating copy to clipboard operation
WordPress-iOS copied to clipboard

Notifications: comment notifications can display multiple spaces

Open dzver opened this issue 9 months ago • 4 comments

The website displays multiple spaces as one.

The app preserves the spaces, which leads to the following difference between mobile and web:

Image

Image

dzver avatar Mar 24 '25 21:03 dzver

Thanks for reporting! 👍

dangermattic avatar Mar 24 '25 21:03 dangermattic

@dzver, do you have any reference to the regex that you use on the web for this purpose? In this way, we can align the behavior.

pmusolino avatar Mar 31 '25 18:03 pmusolino

@pmusolino missed the ping. There's no regexp. The default behavior for white spaces on web is like that, and if you want to display the spaces, they need to be in pre, either a pre tag, or with pre css.

white-space: pre; /* says it won't collapse white space, nowrap */
white-space: pre-wrap; /* won't collapse white space and still wraps */

dzver avatar Apr 17 '25 05:04 dzver