CreateJS / EaselJS

The Easel Javascript library provides a full, hierarchical display list, a core interaction model, and helper classes to make working with the HTML5 Canvas element much easier.
http://createjs.com/
MIT License
8.11k stars 1.97k forks source link

Add support for non breaking spaces #1060

Closed daedeloth closed 2 years ago

daedeloth commented 3 years ago

Hi

I've changed the way words are split in Text elements so that it respects non breaking spaces. I feel like this should be the default way of handling this, so that's why I'm submitting this pull requests :-)

Thanks for your consideration

Thijs

daedeloth commented 3 years ago

Hi

This sounds very strange, I have a build of this at https://github.com/CatLabInteractive/EaselJS/tree/catlab-build and I'm already using this in our project at beta.quizwitz.com, so not sure why it wouldn't work? What is the error you are seeing?

Thanks Thijs

daedeloth commented 3 years ago

Sorry, you are correct, it is not working at the moment. I'll see if I can fix it.

daedeloth commented 3 years ago

Sorry about this, it wasn't properly tested and I incorrectly copied the regular expression from https://developer.mozilla.org/nl/docs/Web/JavaScript/Guide/Regular_Expressions. Now it should be correct.

danzen commented 2 years ago

This was put in place without the Merge... not sure why but it was there when I looked.