Simplify IsWhitespace
This commit is contained in:
parent
fd11d70fcd
commit
a493a9756e
|
|
@ -328,21 +328,15 @@ namespace Microsoft.AspNetCore.Mvc.Razor.TagHelpers
|
||||||
|
|
||||||
private static bool IsCharWhitespace(char ch)
|
private static bool IsCharWhitespace(char ch)
|
||||||
{
|
{
|
||||||
var i = 0;
|
for (var i = 0; i < ValidAttributeWhitespaceChars.Length; i++)
|
||||||
for (; i < ValidAttributeWhitespaceChars.Length; i++)
|
|
||||||
{
|
{
|
||||||
if (ValidAttributeWhitespaceChars[i] == ch)
|
if (ValidAttributeWhitespaceChars[i] == ch)
|
||||||
{
|
{
|
||||||
break;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// the character is not white space
|
||||||
if (i == ValidAttributeWhitespaceChars.Length)
|
return false;
|
||||||
{
|
|
||||||
// the character is not white space
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private class EncodeFirstSegmentContent : IHtmlContent
|
private class EncodeFirstSegmentContent : IHtmlContent
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue