chalk / wrap-ansi

Wordwrap a string with ANSI escape codes
MIT License
120 stars 25 forks source link

Support for unicode surrogate pairs #11

Closed sindresorhus closed 7 years ago

sindresorhus commented 8 years ago

https://mathiasbynens.be/notes/javascript-unicode

I've added a failing skipped test: https://github.com/chalk/wrap-ansi/commit/970e1a71e13adbe4385be751cfa42adf650a8b71

kevva commented 7 years ago

Would it be okay if I rewrote it to using ES2015 syntax? This is so we can iterate through them like https://github.com/chalk/slice-ansi/pull/8/files#diff-168726dbe96b3ce427e7fedce31bb0bcR50. Without for...of we'd need to introduce some looping logic that does this for us.

sindresorhus commented 7 years ago

Sure

sindresorhus commented 7 years ago

@kevva This module is now using ES2015 syntax, although I might have missed something. Interested in resolving this issue here too?

kevva commented 7 years ago

Oh, nice that you beat me to it :). I'll take a look at it tonight!