Closed shettyanusha closed 3 months ago
@shettyanusha thanks for raising the bug. Are you using the latest version of the package? If I try and use your reproduction case I get an empty string. That is obviously still a bug but not this error.
@shettyanusha - I am in the midst of releasing this to Nuget. It wil be in version 6.2.1.4.
Kind regards.
Thank you so much @baynezy. I'm on .NETStandard 2.1 and it seems like version 6 is not compatible with it. The Html2Markdown version is 5.1.0
Report issue
If there is an extrab__5_0(String current, IReplacer element)
at System.Linq.Enumerable.Aggregate[TSource,TAccumulate](IEnumerable
<ul>
in the html string, the package throws the below error System.InvalidOperationException: Sequence contains no elements at System.Linq.ThrowHelper.ThrowNoElementsException() at System.Linq.Enumerable.Aggregate[TSource](IEnumerable1 source, Func
3 func) at Html2Markdown.Replacement.HtmlParser.ReplaceList(String html) at Html2Markdown.Replacement.HtmlParser.ReplaceLists(String html) at Html2Markdown.Replacement.CustomReplacer.Replace(String html) at Html2Markdown.Converter.<>c.1 source, TAccumulate seed, Func
3 func) at Html2Markdown.Converter.Convert(String html)The String used to test this -
<ul><ul><li>first list val</li></ul></ul>
Expected behavior
The extra
<ul>
tag should be ignored.Actual Behaviour
Error
Steps to reproduce the problem
var description = "<ul><ul><li>first list val</li></ul></ul>"; var converter = new Converter(); markdown = converter.Convert(description);