Skip to content

<a> is duplicated in a specific pattern in <td> #13490

@ryuapp

Description

@ryuapp

Astro Info

Astro                    v5.5.4
Node                     v23.10.0
System                   Windows (x64)
Package Manager          deno
Output                   static
Adapter                  none
Integrations             none

If this issue only occurs in one browser, which browser is a problem?

No response

Describe the Bug

If we create the following astro file and build it, the a tag will be duplicated.

<article>
  <div>
    <td>
      <a href="https://example.com">
        {"hello"}
      </a>
    </td>
  </div>
</article>

Build Result:

<!DOCTYPE html>
<article>
  <div>
    <td><a href="https://example.com"> hello </a></td>
    <a href="https://example.com"></a>
  </div>
  <a href="https://example.com"></a>
</article>

What's the expected result?

<!DOCTYPE html>
<article>
  <div>
    <td><a href="https://example.com"> hello </a></td>
  </div>
</article>

Link to Minimal Reproducible Example

https://stackblitz.com/edit/github-hncitz6f?file=src%2Fpages%2Findex.astro

Participation

  • I am willing to submit a pull request for this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs triageIssue needs to be triaged

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions