aaronsw / html2text

Convert HTML to Markdown-formatted text.
http://www.aaronsw.com/2002/html2text/
GNU General Public License v3.0
2.57k stars 410 forks source link

gap appears before char when any html char is inside a strong tag e.g #122

Open cfficaurzua opened 4 years ago

cfficaurzua commented 4 years ago

Input:

<p><strong>Descripci&oacute;n:</strong></p><p>El filamento de l&aacute;piz 3d es....

Output:

** Descripci ón:**
El filamento del lápiz 3d es...

As shown above, the second "acute" char gets properly rendered while the first one got an unexpected gap.

Config:

h.ignore_links = True
h.ignore_images = True
h.unicode_snob = True
h.dash_unordered_list = True
h.ignore_anchors = True
heyhimansh commented 1 year ago

Hey buddy , I think there is no such error occurs is any than it is generally due the padding of the strong tag element.

cfficaurzua commented 1 year ago

Hey buddy , I think there is no such error occurs is any than it is generally due the padding of the strong tag element.

The padding should be at the beginning of the tag, not in the middle. Therefore it is a bug.

PierreMDL commented 7 months ago

Any heads-up regarding that bug? Or a workaround?