compiler icon indicating copy to clipboard operation
compiler copied to clipboard

.astro files don't treat a missing '>' as a syntax error

Open cgsdev0 opened this issue 2 years ago • 1 comments

Astro Info

Astro                    v4.3.2
Node                     v19.7.0
System                   Linux (x64)
Package Manager          npm
Output                   static
Adapter                  none
Integrations             none

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

No response

Describe the Bug

I had a project where I was experiencing really strange behavior, and I noticed it was because I had an a tag with a missing > in a .astro file. This wasn't highlighted as an error in my editor, and it also wasn't reporting any errors or warnings when I built the project.

minimum repro:

  1. create a new project
  2. delete the > on line 12 in Card.astro

What's the expected result?

this should probably be raised as a syntax error, both in the editor and at build time.

Link to Minimal Reproducible Example

https://stackblitz.com/edit/github-dxn5fq?file=src%2Fcomponents%2FCard.astro

Participation

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

cgsdev0 avatar Feb 03 '24 23:02 cgsdev0

just noticed this is probably better suited for https://github.com/withastro/compiler

let me know if i should re-create the issue there

cgsdev0 avatar Feb 03 '24 23:02 cgsdev0