python-markdownify icon indicating copy to clipboard operation
python-markdownify copied to clipboard

`wrap` option does not work inside list items

Open BioBox opened this issue 3 years ago • 3 comments

Bullet list entries are not wrapped when setting wrap=True.

BioBox avatar Sep 20 '22 18:09 BioBox

I am running into the same issue.

ryanmkurtz avatar Nov 05 '24 15:11 ryanmkurtz

@BioBox, @ryanmkurtz - currently, the wrapping code is implemented only for <p> tags. I agree that this is a limitation, but list items are tricky because they can contain mixes of block and inline content.

Until this is implemented, would you consider preprocessing your HTML to wrap your list-item content in <p> tags? If so, I can provide some Beautiful Soup code that might help.

chrispy-snps avatar Mar 02 '25 13:03 chrispy-snps

I ended up just accepting that the wrap didn't work, which didn't stop me from achieving my goal. I've since moved on to other things. Thanks though!

ryanmkurtz avatar Mar 03 '25 11:03 ryanmkurtz