From ac8e8ab519b0e37ecf019345223f5e6d3a1bb2b0 Mon Sep 17 00:00:00 2001 From: Will Nayes Date: Mon, 19 Oct 2020 10:05:43 -0500 Subject: [PATCH] Compare tags in case insensitive manner. --- AspxParser/AspxParser.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/AspxParser/AspxParser.cs b/AspxParser/AspxParser.cs index 5de2633..dbf5935 100644 --- a/AspxParser/AspxParser.cs +++ b/AspxParser/AspxParser.cs @@ -172,7 +172,7 @@ void IParserEventListener.OnTag(Location location, TagType tagType, string name, for (var node = currentNode; !(node is AspxNode.Root); node = node.Parent) { var casted = node as AspxNode.OpenAspxTag; - if (casted != null && casted.Prefix == prefix && casted.ControlName == controlName) + if (casted != null && casted.Prefix.EqualsNoCase(prefix) && casted.ControlName.EqualsNoCase(controlName)) { currentNode = casted.Parent; break; @@ -186,7 +186,7 @@ void IParserEventListener.OnTag(Location location, TagType tagType, string name, for (var node = currentNode; !(node is AspxNode.OpenAspxTag || node is AspxNode.Root); node = node.Parent) { var casted = node as AspxNode.OpenHtmlTag; - if (casted != null && casted.Name == name) + if (casted != null && casted.Name.EqualsNoCase(name)) { currentNode = casted.Parent; break;