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
Relates to remarkablemark/html-react-parser#624
When I parse HTML with html-dom-parser on the client:
html-dom-parser
<head></head> <body >text</body>
I should get both head and body elements.
head
body
I get only head element and no body:
[ { "parent": null, "prev": null, "next": null, "startIndex": null, "endIndex": null, "children": [], "name": "head", "attribs": {}, "type": "tag" } ]
import parse from 'html-dom-parser' parse(` <head></head> <body >text</body> `)
The cause of the bug is due to catch-all-regex for head and body in domparser needs to be DOTALL to include newlines.
https://codesandbox.io/s/html-react-parsser-624-p0i5pd?file=/src/App.js
The text was updated successfully, but these errors were encountered:
fix(client): ensure head and body with newline are parsed correctly
b26b645
Fixes #317 remarkablemark/html-react-parser#624
Successfully merging a pull request may close this issue.
Relates to remarkablemark/html-react-parser#624
Expected Behavior
When I parse HTML with
html-dom-parser
on the client:I should get both
head
andbody
elements.Actual Behavior
I get only
head
element and nobody
:Steps to Reproduce
The cause of the bug is due to catch-all-regex for
head
andbody
in domparser needs to be DOTALL to include newlines.Reproducible Demo
https://codesandbox.io/s/html-react-parsser-624-p0i5pd?file=/src/App.js
Environment
The text was updated successfully, but these errors were encountered: