-
-
Notifications
You must be signed in to change notification settings - Fork 867
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
7+: Can't parse links #747
Comments
Hey! See the syntax highlighting above: you’re doing it wrong. You should pass a string, not react children. Check that markdown in the demo: it works fine: https://remarkjs.github.io/react-markdown/. Also: how do you get that error? Please provide more info on that error. |
This comment has been minimized.
This comment has been minimized.
Hi! Thanks for reaching out! Because we treat issues as our backlog, we close issues that are questions since they don’t represent a task to be completed. See our support docs for how and where to ask questions. Thanks, |
Hi @wooorm, Thanks for such a swift response. Not sure if I understand the difference between using a string vs using children (in my case I can ensure it is a string), but even if I do it according to the link you mentioned e.g. <ReactMarkdown>{`* Follows [CommonMark](https://commonmark.org)`}</ReactMarkdown> it throws the same error:
|
Are you sure your example is everything? Sounds like you are using plugins? Our tests work fine. |
If you’re migrating and updating, perhaps nuke your package locks and install again? |
Okay, I couldn't resist and actually figured something out: it does work with parcel's prod build, but doesn't in parcel's dev build (no additional configuration is given for parcel) |
Plugins could be injecting invalid content, or modifying links.
That is very possible.
Without being able to replicate the issue, it's difficult to offer many meaningful suggestions. |
|
Yeah, it seems like it drops the reference to if (info.space && info.property) {
console.log(hastToReact)
props[
own.call(hastToReact, info.property)
? hastToReact[info.property]
: info.property
] = result
} else if (info.attribute) {
props[info.attribute] = result
} So, that said, it seems everything is correct with the library 😸 . Sorry for the false alarm, I'll follow up in Parcel discussions: parcel-bundler/parcel#9113. Many thanks for your time! |
Came across the exact same issue and we are also using parcel... Thanks for this ticket Update: import Markdown from 'react-markdown';
import 'information-property';
// then in tsx, it's working...
<Markdown>{content}</Markdown> |
Context: parcel@2.9.3, react-markdown@8.0.0 |
when bundling the app using parcel (vite storybook works fine using 8.0.7) see: remarkjs/react-markdown#747 and parcel-bundler/parcel#9113
Thx! import 'property-information'
// not import from 'information-property'; |
The error manifested for me as unable to read |
Same error message as Julia when using |
Locking as there is no issue here. |
Initial checklist
Affected packages and versions
7.0.0+
Link to runnable example
No response
Steps to reproduce
Install
react-markdown
of version 7 or later.Use following code to reproduce the error
Expected behavior
Should render a link like in 6.x
Actual behavior
Cannot convert undefined or null to object
Runtime
Node v16
Package manager
yarn 1
OS
macOS
Build and bundle tools
Parcel
The text was updated successfully, but these errors were encountered: