You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If there is an extra <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, Func3 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.b__5_0(String current, IReplacer element)
at System.Linq.Enumerable.Aggregate[TSource,TAccumulate](IEnumerable1 source, TAccumulate seed, Func3 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);
The text was updated successfully, but these errors were encountered:
@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.
Report issue
If there is an extra
<ul>
in the html string, the package throws the below errorSystem.InvalidOperationException: Sequence contains no elements
at System.Linq.ThrowHelper.ThrowNoElementsException()
at System.Linq.Enumerable.Aggregate[TSource](IEnumerable
1 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.b__5_0(String current, IReplacer element)
at System.Linq.Enumerable.Aggregate[TSource,TAccumulate](IEnumerable
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);
The text was updated successfully, but these errors were encountered: