matthewwithanm / python-markdownify

Convert HTML to Markdown
MIT License
1.17k stars 140 forks source link

fix unnecessary /n newlines resulting in a lot of white area in the markdown #131

Closed archit15singh closed 5 months ago

archit15singh commented 5 months ago

https://github.com/matthewwithanm/python-markdownify/issues/130

jsm28 commented 5 months ago

PR #120 is mainly about ensuring there are enough newlines before and after each construct (based on what newlines are required by Markdown semantics), but also avoids accumulation of duplicate newlines between adjacent constructs (while still following the design principle of keeping newlines that were present in the input HTML). It also makes sure to update all affected tests.

The removal of comments and doc strings in this PR is certainly unhelpful and inappropriate, as are the gratuitous removals of various blank lines from the source.

archit15singh commented 5 months ago

Hi @jsm28, apologies for any confusion—my intention was to submit a draft PR, not to omit the docstrings. I plan to reinstate everything you've highlighted. After removing the newlines, the code became cluttered, so I've decided to withdraw my PR for now. Cheers! I'm sorry if my initial submission seemed unhelpful or misplaced. I'll be creating a fork to make adjustments that better suit my use case. Thanks for your feedback and for maintaining this repository; it's been immensely useful for my work.