dont treat comments as elements

This commit is contained in:
bluepilledgreat 2024-10-20 16:51:43 +01:00
parent 7c8c8c645b
commit e8d1fbac94

View File

@ -224,7 +224,8 @@ namespace Bloxstrap.UI.Elements.Editor
int endIdx = Math.Min(endIdx1, endIdx2); int endIdx = Math.Min(endIdx1, endIdx2);
if (endIdx2 > 0 && endIdx2 < int.MaxValue && endIdx > startIdx) if (endIdx2 > 0 && endIdx2 < int.MaxValue && endIdx > startIdx)
{ {
return xml.Substring(startIdx + 1, endIdx - startIdx - 1); string element = xml.Substring(startIdx + 1, endIdx - startIdx - 1);
return element == "!--" ? null : element; // dont treat comments as elements
} }
else else
{ {