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