compiler
compiler copied to clipboard
🐛 BUG: `<table>` element issues revisted: Expected ")" but found "}"
What version of @astrojs/compiler are you using?
0.23.4
And Astro 1.1.5.
What package manager are you using?
npm
What operating system are you using?
macOS 12
Describe the Bug
Very similar / nearly identical issue to previously closed issue #431 and #235.
The error is:
[plugin:astro:build] Transform failed with 1 error:
/home/projects/github-whlnjq-q1phey/src/pages/[page].astro:67:17: ERROR: Expected ")" but found "}"
Code that doesn't work: <tr><td>{page.frontmatter.title}</td></tr>
<ul>
{Astro.props.page.data.map(page =>
<li>
<table>
<tr><td>{page.frontmatter.title}</td></tr>
<tr><td>
<Debug {Object.keys(page)} />
</td></tr>
</table>
</li>
)}
</ul>
Code that works (workaround): <tr><><td>{page.frontmatter.title}</td></></tr>
<ul>
{Astro.props.page.data.map(page =>
<li>
<table>
<tr><><td>{page.frontmatter.title}</td></></tr>
<tr><td>
<Debug {Object.keys(page)} />
</td></tr>
</table>
</li>
)}
</ul>
Link to Minimal Reproducible Example
https://stackblitz.com/edit/github-whlnjq-q1phey?file=src/pages/[page].astro