Skip to content

Component end tags and start tags behave differently #12326

@davidwengier

Description

@davidwengier

Found by @MattParkerDev

When I added source mapping for component tags, I completely forgot about end tags, so they're not mapped. I don't believe we can map the end tags, because we require source mappings and line pragmas to match exactly, so we probably need to just handle this in tooling. It should be pretty easy though.

Take this hover example:
Image

When hovering over the start component tag, we map to C# and hover shows results from Roslyn. When hovering over the end tag we get the Razor hover result which is different (and worse). Same for Go To Definition and Find All References I imagine.

We can solve this by just detecting that we're being asked to Hover/GTD/FAR on an end tag, and pretend we're on the start tag instead, before calling Roslyn.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions