-
-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
micromark-util-character: fix crash on some Node.js versions #157
Conversation
Signed-off-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
This comment has been minimized.
This comment has been minimized.
Lazy loading isn’t going to solve it. This regex is required to parse markdown. Hmmm. I literally started using this because this is now available in modern browsers and Node 16+ (https://github.com/micromark/micromark/releases/tag/4.0.0). I feel like we should be able to depend on recent Unicode? |
Bummer, also I remember now that a SyntaxError would still be emitted no matter if the code is executed. Maybe we could try using the
Node.js supports being build without any unicode support, I've suggested deprecating it that in nodejs/node#35942, you can read through the responses to see what are the use cases for this. |
Like, markdown uses unicode. We could inject all those unicode characters in the regex again (like before), but that feels like going against someone specifically compiling without unicode support?
This might be out of Nodes control but couldn’t it then use ascii punctuation in this case? |
So your problem is that the Node project doesn’t compile. If it were to compile, it doesn’t actually parse markdown, so it wouldn’t get an error? |
The problem is that we need to build the docs before running the tests (because some tests ensure some specific parts of the documentation matches the actual implementation), and the way the CI is configured today, it's using the binary freshly built, which doesn't have unicode support.
I've tried that, and as you predicted, it didn't help because the code is still run.
I'm not sure what you mean by that, I think Node.js documentation is ASCII-only. |
That for \P, when you build as ascii, to use ascii punctuation, instead of unicode punctuation |
Closing as abandoned. I still kinda feel like, if v8 is built to not include unicode knowledge, then If there was some |
This comment has been minimized.
This comment has been minimized.
I would have to doublecheck, but I think |
Hmm, maybe interesting, but I was hoping for |
|
And what would it do? |
Initial checklist
Description of changes
\p
regex notation is not available on Node.js build without intl support, causing the process to crash even the regex is never used. Ideally we would have a regex that works everywhere, but I figure lazy-loading the same regex should be enough for most use-cases.Refs: nodejs/node#49988 (comment)