Moved the comment check into the "ValidateParentAllowsContent" method
This commit is contained in:
parent
679acdc5d4
commit
a940a4cd91
|
|
@ -116,7 +116,7 @@ namespace Microsoft.AspNetCore.Razor.Language.Legacy
|
|||
continue;
|
||||
}
|
||||
}
|
||||
else if (!IsComment((Span)child))
|
||||
else
|
||||
{
|
||||
ValidateParentAllowsContent((Span)child, errorSink);
|
||||
}
|
||||
|
|
@ -488,7 +488,7 @@ namespace Microsoft.AspNetCore.Razor.Language.Legacy
|
|||
|
||||
private void ValidateParentAllowsContent(Span child, ErrorSink errorSink)
|
||||
{
|
||||
if (HasAllowedChildren())
|
||||
if (HasAllowedChildren() && !IsComment(child))
|
||||
{
|
||||
var content = child.Content;
|
||||
if (!string.IsNullOrWhiteSpace(content))
|
||||
|
|
|
|||
Loading…
Reference in New Issue