Closed zhou closed 4 years ago
Sorry, can you clarify where it doesn’t work? I’m happy to catch this but I’ve been using it in node and browsers for a while without any issues.
Thanks for prompt resolution. Now we need to convey the message to typestyle to bring in the fix.
Octal escape sequences are invalid in strict mode. We discovered this because typestyle made a major update a few weeks back and brought in free-style 3.1.0. And our app could not start and shows an error: 🚨 //node_modules/typestyle/node_modules/free-style/dist.es2015/index.js: Octal escape sequences are not allowed in template strings
After some googling, we found out that: In Line 260 and 268, patterns like \0 should be escaped: \0. For example: 260: isUnique ?
u\0${(++uniqueId).toString(36)}
:s\0${pid}\0${style}
should be 260: isUnique ?u\\0${(++uniqueId).toString(36)}
:s\\0${pid}\\0${style}
For your reference, a related issue in Babel is here: https://github.com/choojs/nanohtml/issues/141