JohannesKaufmann / html-to-markdown

⚙️ Convert HTML to Markdown. Even works with entire websites and can be extended through rules.
MIT License
891 stars 85 forks source link

🐛 Bug #110

Closed dvogt23 closed 2 months ago

dvogt23 commented 2 months ago

Describe the bug Eating a space between a link and a mention from mastodon post.

HTML Input

<p>test this archive project 🤩 <a href=\"https://mas.to/tags/microblog\" class=\"mention hashtag\" rel=\"tag\">#<span>microblog</span></a> <span class=\"h-card\" translate=\"no\"><a href=\"https://social.coop/@ggpsv\" class=\"u-url mention\">@<span>ggpsv</span></a></span></p>

Generated Markdown

test this archive project 🤩 [#microblog](\"https://mas.to/tags/microblog\")[@ggpsv](\"https://social.coop/@ggpsv\")

Expected Markdown

test this archive project 🤩 [#microblog](\"https://mas.to/tags/microblog\") [@ggpsv](\"https://social.coop/@ggpsv\")

Tested with html2md on cli with actual version.

JohannesKaufmann commented 2 months ago

Hi @dvogt23

thanks for submitting the bug! This is similar to #95 and will be fixed with V2 of the libary (see demo).

JohannesKaufmann commented 2 months ago

On the "v2" branch are a lot of improvements — including a fix to this bug.

It is still experimental but feel free to give it a try. Happy to hear about your experience 😊

I am going to close this issue. If you find anything with the new version, please open a new issue!