-
Notifications
You must be signed in to change notification settings - Fork 167
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
Docs: Revise sample code for inline images #306
base: main
Are you sure you want to change the base?
Conversation
@twfahey1 is attempting to deploy a commit to the Chapter Three Team on Vercel. A member of the Team first needs to authorize it. |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@@ -22,8 +22,7 @@ yarn add html-react-parser | |||
Update the component from [images](/docs/guides/inline-images) to handle inline links. | |||
|
|||
```tsx title=components/body.tsx | |||
import { HTMLReactParserOptions, domToReact } from "html-react-parser" // highlight-line | |||
import { Element } from "domhandler/lib/node" | |||
import { HTMLReactParserOptions, domToReact, Element } from "html-react-parser" // highlight-line |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change doesn't look right.
I took a look at the domhandler NPM package and it now exports Element from its main entry point. See Line 14 of src/index.ts.
So the change should be:
import { Element } from "domhandler"
I was getting an error following the docs page on inline images:
Traced down the issue seeming to be that
Element
has moved into thehtml-react-parser
now? This resolved it in my app... posting for consideration if this is in fact break from a recent update.