Ignore markup comments in components

Fixes: aspnet/AspNetCoredotnet/aspnetcore-tooling#6184

This gives us parity with the current behavior. Since comments aren't
meaningful in a component/render-tree context, we ignore everything
inside of them for codegen/lowering.
\n\nCommit migrated from 7250dd2624
This commit is contained in:
Ryan Nowak 2019-01-01 19:51:29 -08:00
parent f741241171
commit 74d56ce024
1 changed files with 5 additions and 0 deletions

View File

@ -1331,6 +1331,11 @@ namespace Microsoft.AspNetCore.Razor.Language
});
}
public override void VisitMarkupCommentBlock(MarkupCommentBlockSyntax node)
{
// Comments are ignored by components. We skip over anything that appears inside.
}
public override void VisitCSharpTemplateBlock(CSharpTemplateBlockSyntax node)
{
var templateNode = new TemplateIntermediateNode();