-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Closed as not planned
Labels
needs triageIssue needs to be triagedIssue needs to be triaged
Description
Astro Info
Astro v4.16.7
Node v20.12.2
System macOS (arm64)
Package Manager npm
Output server
Adapter @astrojs/node
Integrations @astrojs/solid-js
If this issue only occurs in one browser, which browser is a problem?
No response
Describe the Bug
The following page:
---
import MailLayout from '../components/MailLayout.astro'
const name = 'foo'
---
<MailLayout>
<tr>
<td>
<a href="/foo" target="_blank">
{name}
</a>
</td>
</tr>
<div slot="footer">
Footer
</div>
</MailLayout>that uses components/MailLayout.astro:
---
---
<main>
<slot />
</main>
<footer>
<slot name="footer" />
</footer>Is converted to the following HTML, which is obviously wrong:
<body>
<main>
<a href="/foo" target="_blank"> foo </a>
<a href="/foo" target="_blank">
<div slot="footer">
Footer
</div>
</a>
</main>
<footer></footer>
</body>What's the expected result?
Correct HTML with non-empty <footer> and not duplicated link.
Link to Minimal Reproducible Example
https://stackblitz.com/edit/github-h3l48b?file=src%2Fpages%2Findex.astro
Participation
- I am willing to submit a pull request for this issue.
Metadata
Metadata
Assignees
Labels
needs triageIssue needs to be triagedIssue needs to be triaged