mixmark-io / turndown

🛏 An HTML to Markdown converter written in JavaScript
https://mixmark-io.github.io/turndown
MIT License
8.93k stars 880 forks source link

Fix bug where li with first child that's a block rendered incorrectly #447

Open dchacke opened 1 year ago

dchacke commented 1 year ago

Fixes the first issue mentioned in #357. I describe the bug in more detail here: https://github.com/mixmark-io/turndown/issues/357#issuecomment-1694699312

The modified tests technically already cover the bug fix but I added a couple of tests to make the desired behavior more explicit.