baynezy/Html2Markdown

Markdown generation breaks with updated HtmlAgilityPack

Closed this issue · 2 comments

Report issue

I have a project that already has dependency on HtmlAgilityPack 1.11.38, while HtmlMarkdown depends on 1.5.0

Now with the code below

var converter = new Converter();
converter.Convert("<p><span>A</span>B<span>C</span></p>");

It works if I use HtmlAgilityPack 1.5.0 but throws exception with version 1.11.38 System.Exception: 'Multiple node elements can't be created.' from HtmlAgilityPack

The offending line is

var markdownNode = HtmlNode.CreateNode(markdown);
with markdown "\r\n\r\n<span>A</span>B<span>C</span>\r\n"

Could this be why the HtmlAgilityPack is not updated?

The reason HtmlAgilityPack has not been updated is because of zzzprojects/html-agility-pack#74 (comment)

I cannot work with a library that cares so little for its consumers. #68 is the solution. I'm just not in a position to resolve that currently.

@sake402 - I have looked at the changes required and I am going to resolve this in #119