Skip to content
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

HtmlNode.CreateNode() returns a #text node when its parameter starts with "\n" #28

Closed
OpportunityLiu opened this issue Jun 28, 2017 · 3 comments
Assignees

Comments

@OpportunityLiu
Copy link

HtmlNode node = HtmlNode.CreateNode(@"
<p>text</p>
");

You'll get node.OuterHtml == "\r\n".

I don't think it is the expacted result.

In source I found the first element of the document directly returned, maybe we should check it before return.

@JonathanMagnan JonathanMagnan self-assigned this Jun 28, 2017
@JonathanMagnan
Copy link
Member

Hello @OpportunityLiu ,

Thank you for reporting. I will have my developer assigned to this project to look on this issue during the weekend.

Best Regards,

Jonathan

@JonathanMagnan
Copy link
Member

Hello @OpportunityLiu ,

The v1.5.1-beta1 has been released.

The CreateNode should now return the tag as expected.

Let me know if this version is working with your scenario.

Best Regards,

Jonathan

@OpportunityLiu
Copy link
Author

It works well, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants