ashishb / wp2hugo

The best WordPress to Hugo migrator (written in Go)
Other
16 stars 1 forks source link

HTML to Markdown inserts an extra space before links #11

Open zturtleman opened 3 months ago

zturtleman commented 3 months ago

wp2hugo inserts an extra space before links (second and third links) if not at the beginning of the line (first link) or proceeded by a space (forth link).

WordPress XML export:

<!-- wp:paragraph -->
<p><a href="https://example.com">Hello world</a>. "<a href="https://example.com">Example 1</a>". (<a href="https://example.com">Example 2</a>, <a href="https://en.wikipedia.org">Wikipedia</a>)</p>
<!-- /wp:paragraph -->

Hello world. "Example 1". (Example 2, Wikipedia)

Generated by wp2hugo:

[Hello world](https://example.com). " [Example 1](https://example.com)". ( [Example 2](https://example.com), [Wikipedia](https://en.wikipedia.org))

Hello world. " Example 1". ( Example 2, Wikipedia)

ashishb commented 3 months ago

@zturtleman Seems like an issue with underlying library, I am trying to see what I can do here.