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
Hello! Thanks for the awesome library. I use it in my project, dedoc.
Some time ago, I encountered a problem that occasionally, even though they are present in the HTML, the fragments are skipped and nowhere to be found in TaggedLine's elements.
I took time to investigate, and it seems that this bug occurs when FragmentStart is the only element in the tagged line.
Since the TaggedLineElement is considered as having no content if it's a FragmentStart:
Hello! Thanks for the awesome library. I use it in my project, dedoc.
Some time ago, I encountered a problem that occasionally, even though they are present in the HTML, the fragments are skipped and nowhere to be found in
TaggedLine
's elements.I took time to investigate, and it seems that this bug occurs when
FragmentStart
is the only element in the tagged line.Since the
TaggedLineElement
is considered as having no content if it's aFragmentStart
:rust-html2text/src/render/text_renderer.rs
Lines 128 to 137 in 240a4cc
The
TaggedLine
is considered empty when it's made exclusively ofFragmentStart
elements:rust-html2text/src/render/text_renderer.rs
Lines 186 to 193 in 240a4cc
TaggedLine
, which contain onlyFragmentStart
elements are lost. Seems like due to this condition:rust-html2text/src/render/text_renderer.rs
Line 365 in 240a4cc
Attached is an page with fragments, taken from golang documentation, which is affected by the issue.
example_page.txt
Is this the desired behavior?
The text was updated successfully, but these errors were encountered: