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

Astro misparses template following ternary #962

Closed
mb21 opened this issue Feb 5, 2024 · 1 comment
Closed

Astro misparses template following ternary #962

mb21 opened this issue Feb 5, 2024 · 1 comment
Labels
needs triage Issue needs to be triaged

Comments

@mb21
Copy link

mb21 commented Feb 5, 2024

What version of @astrojs/compiler are you using?

2.5.2

Note that I can reproduce in astro 4.3.2 but it worked still correctly in astro v4.2.1.

What package manager are you using?

npm

What operating system are you using?

Mac

Describe the Bug

In the following astro template, <h2>Chats</h2> is just ignored:

---
import Layout from '../Layout.astro'
---
<Layout>
  {'foo' ? <p>A</p> : <p>B</p>}

  <h2>Chats</h2>
</Layout>

With Layout.astro containing just <slot />.

Link to Minimal Reproducible Example

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

@github-actions github-actions bot added the needs triage Issue needs to be triaged label Feb 5, 2024
@MoustaphaDev
Copy link
Member

Thanks for taking the time to report this!
I can see that it's the same issue issue reported in #955. We're already tracking it there, so I'm going to close this as a duplicate. You can follow the workaround in the linked issue in the meantime.

@MoustaphaDev MoustaphaDev closed this as not planned Won't fix, can't repro, duplicate, stale Feb 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs triage Issue needs to be triaged
Projects
None yet
Development

No branches or pull requests

2 participants