Closed piranna closed 5 years ago
Can you add a test?
Ping :)
Just ran into the same problem, and found this PR while troubleshooting the code. I can confirm this fix working by modifying the installed source in node_modules. 👍
@sindresorhus while a test is missing for the code change, it seems like the last CI test failure was due to some xo
offenders unrelated to this PR?
I have just merged the test provided by @viddo.
Thank you :-)
The slice only pick 4 bytes, not enough for longer escape sequences. This change increase it to 18, allowing to accept escape sequences for true color definitions. I have not used an unbounded limit to don't check the regular expression against probably very long strings.
Fix #17