troika icon indicating copy to clipboard operation
troika copied to clipboard

troika-three-text: Don't break line when   is encountered

Open tvler opened this issue 3 years ago • 3 comments

Hello! This PR updates troika-three-text so that users can use the "Non-breaking space" character (https://en.wikipedia.org/wiki/Non-breaking_space) without causing a linebreak.

This is done by updating the use of \s (whitespace selector) to be [^\S\u00A0] – which is a negating selector group that doesn't select everything that is not a whitespace character or a non-breaking space character. Functionally, this can be simplified to "whitespace characters except u00A0".

tvler avatar May 31 '22 22:05 tvler

Thanks for this. The change looks reasonable, I will try to verify it soon.

lojjic avatar Jun 02 '22 17:06 lojjic

Thanks for this. The change looks reasonable, I will try to verify it soon.

Thanks! I tried to get some tests out for this but unfortunately I wasn't able to set up the dev environment on my M1 MacBook. If this repo is working for you on apple silicon could you lmk what version of node you're running?

tvler avatar Jun 02 '22 18:06 tvler

I don't have an M1 machine, can't help you there.

lojjic avatar Jun 02 '22 19:06 lojjic