Skip to content

🐛 BUG: Compiler diagnostic doesn't work if it's the only thing in the file #729

@Princesseuh

Description

@Princesseuh

What version of @astrojs/compiler are you using?

1.1.1

What package manager are you using?

pnpm

What operating system are you using?

macOS

Describe the Bug

Super edge case incoming, but this tripped up the language-server test suite.

If the file only contain a tag with no name, like such:

< class="hello"></class>

The compiler won't return a diagnostic telling the user to use Fragment. Adding a space in front of it, or moving it to another line works. It's really only if this is the only thing

Link to Minimal Reproducible Example

See description

Metadata

Metadata

Assignees

Labels

- P2: nice to haveNot breaking anything but nice to have (priority)

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions