Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 BUG: <a href="URL">URL</a> tags in Markdown files generate double links #3529

Closed
1 task
andygrunwald opened this issue Jun 6, 2022 · 2 comments · Fixed by #3564
Closed
1 task

🐛 BUG: <a href="URL">URL</a> tags in Markdown files generate double links #3529

andygrunwald opened this issue Jun 6, 2022 · 2 comments · Fixed by #3564
Labels
- P4: important Violate documented behavior or significantly impacts performance (priority) feat: markdown Related to Markdown (scope)

Comments

@andygrunwald
Copy link

andygrunwald commented Jun 6, 2022

What version of astro are you using?

v1.0.0-beta.40

Are you using an SSR adapter? If so, which one?

None

What package manager are you using?

npm

What operating system are you using?

Linux

Describe the Bug

When you clone the Astro Starter Kit: Blog with Multiple Authors example and have block posts where raw HTML is part of the content like:

<ul>
    <li>Pieter Levels <a href="https://levels.io/async/">https://levels.io/async/</a></li>
</ul>

Astro generates content like

<ul>
<li>Pieter Levels
<a href="https://levels.io/async/"></a><a href="https://levels.io/async/">https://levels.io/async/</a>
</li>
</ul>

It seems that if the content of the <a>-tag is also a URL, the markdown parser automatically generates an additional (empty) <a> tag.

See screenshot:
Screenshot from 2022-06-06 12-20-00

Expected result

Output generation like

<ul>
<li>Pieter Levels
<a href="https://levels.io/async/">https://levels.io/async/</a>
</li>
</ul>

Link to Minimal Reproducible Example

https://stackblitz.com/edit/github-tulupu?file=src/pages/post/chapter-i.md

Participation

  • I am willing to submit a pull request for this issue.
@natemoo-re natemoo-re added feat: markdown Related to Markdown (scope) - P4: important Violate documented behavior or significantly impacts performance (priority) s1-small labels Jun 6, 2022
@natemoo-re
Copy link
Member

This definitely looks like a regression with our Markdown handling! We're still trying to track down a few remaining issues like this. It's a high priority to fix!

@andygrunwald
Copy link
Author

@natemoo-re In v1.0.0-beta.31, it is working as expected. In v1.0.0-beta.36 it is broken (like described here).

I assume cfae976 might be a good start (part of astro@1.0.0-beta.33).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
- P4: important Violate documented behavior or significantly impacts performance (priority) feat: markdown Related to Markdown (scope)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants