jugglerchris/rust-html2text

Panic

Closed this issue · 3 comments

In commit 5b9d69f a regression was introduced, since then this fragment panics

<html>
    <body>
        <ul>
            <table><tr></tr></table>
        </ul>
    </body>
</html>

Thanks for the reports and PRs! I just wanted to get back to you to say that I will get to them, hopefully in the next week or two - life is busy right now and other things are a higher priority in the next few days!

I was surprised at the fact that this code does not crash with <ol> tags, upon looking closely ol handling filters out some nodes that il handling does not

Can you add a comment explaining the asymmetry, i.e. why lists seem to have non-RenderNodeInfo::ListItem inside them that must be cleaned to not throw off list numbering?

I've merged #165 MR - thanks! Leaving this open so that I can address #164 (comment) when I have time.
Thanks again!