Open NTaylorMullen opened 3 years ago
Likely problem spot: https://github.com/dotnet/razor-tooling/blob/main/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Semantic/Services/TagHelperSemanticRangeVisitor.cs#L406-L420
Edit: This is not the problem.
It's actually a bit worse than that:
Things really go off the rails if you include html after the fact there.
Looking at the syntax tree here we have another instance of a SyntaxTree which is shorter than the document. Seemingly something about the self-closing <input />
confuses the parent causing the closing </Input>
to be omitted from the SyntaxTree entirely. This seems to happen during one of the post-parse phases, though I haven't identified which one. CC @TanayParikh.
I think this one is trickier since we do have general issues around creating components that "match" the syntax of a valid HTML elements. I need to check with the team what our actual thoughts on this specific case are.
Possibly the same root cause as https://github.com/dotnet/razor/issues/8460
The end
</Input>
tag should be colored. I half wonder if this is a compiler issue but we should investigate nevertheless.