-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Marked@5.1.0 crashes in Hermes (React Native) environment #2843
Comments
This sounds like a bug in Hermes. Unicode escapes have been in JavaScript since ES 2018. |
One option is to use babel-plugin-transform-unicode-escapes and compile marked yourself to use older browser engines |
Thanks @UziTech , I double-checked it indeed fails on |
How is this solved (real question, not snark)? I just tried a fresh project with latest and hermes still breaks on the regex. |
This is an issue in Hermes not marked see facebook/hermes#1027 |
Marked version: 5.1.0
Describe the bug
When
marked
module is loaded, the following line gets called withregex
equal^((?![*_])[\s\p{P}$+<=>`|~])
, which is deemed to be an invalid regular expression by Hermes engine (namely, it calls the error "Invalid escape", not giving more specific details), thus it throws on this line crashing the host appmarked/src/helpers.js
Line 66 in a26f002
It did not happen in the previous, v5.0.5 of
marked
.To Reproduce
Steps to reproduce the behavior:
Expected behavior
A clear and concise description of what you expected to happen.
The text was updated successfully, but these errors were encountered: