We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I expected this test to pass:
const ReactDOMServer = require('react-dom/server') const HtmlToReactParser = require('html-to-react').Parser const foo = () => "lorem" const htmlInput = '<div><h1>Title</h1><foo/><p>A paragraph</p></div>' const expected = '<div><h1>Title</h1>lorem<p>A paragraph</p></div>' const htmlToReactParser = new HtmlToReactParser() const reactElement = htmlToReactParser.parse(htmlInput) const reactHtml = ReactDOMServer.renderToStaticMarkup(reactElement) assert.notEqual(reactHtml, htmlInput) assert.equal(reactHtml, expected)
However, reactHtml is equal to htmlInput in this case.
reactHtml
htmlInput
How to use custom options to achieve this without manually handling each node type?
The text was updated successfully, but these errors were encountered:
Same question here! I'd like to be able to parse Next.js Link components
Link
Sorry, something went wrong.
For reference, I ended up doing this: https://github.com/denisidoro/remacro/blob/master/core/src/renderer.js
Use Multiple Custom components
https://gist.github.com/yadavravi2801/001ac6a157b7018bf501f6fec41d8867
No branches or pull requests
I expected this test to pass:
However,
reactHtml
is equal tohtmlInput
in this case.How to use custom options to achieve this without manually handling each node type?
The text was updated successfully, but these errors were encountered: