tim-gromeyer / html2md

Transform your HTML into clean, easy-to-read markdown with html2md.
https://tim-gromeyer.github.io/html2md/
MIT License
24 stars 2 forks source link

Set hard limit for line wrapping #102

Closed rsyring closed 5 months ago

rsyring commented 5 months ago

Is your feature request related to a problem? Please describe.

I'm trying to use pyhtml2md as a more performant replacement for html2text. One current difference is that html2text will do a hard wrap at 78 (default) characters.

Describe the solution you'd like

It would be nice to be able to configure the line length limit and use it as a "hard stop" instead of having it somewhere between 80 and 100 characters. It would be nice to be able to configure the line length limit and use it as a "hard stop" instead of having it somewhere between 80 and 100 characters.

Describe alternatives you've considered

I'm currently using python's textwrap module. But its slow and a bit hacky.

tim-gromeyer commented 5 months ago

Of course I can add an option for that

tim-gromeyer commented 5 months ago

Should be implemented with this commit, I'll create a release tomorrow, if not, feel free to reopen this issue!