private bool CloseOpenedChilds(HtmlNode current, string closeTag, int textEnd, int htmlEnd, ref HtmlNode newNode)
        {
            bool tagFound = false;

            if (current != null)
            {
                if (string.Compare(current.Tag, closeTag, StringComparison.InvariantCultureIgnoreCase) == 0 && current.IsOpened)
                {
                    current.SetBoundary(textEnd, htmlEnd);
                    newNode = current;
                    return true;
                }

                tagFound = CloseOpenedChilds(current.GetParent(), closeTag, textEnd, htmlEnd, ref newNode);

                if (tagFound)
                {
                    current.Finilize(textEnd);
                }
            }

            return tagFound;
        }
        internal void CloseNonNestedParents(int htmlStart, string tag, IAnalyzerContext context, ref HtmlNode parent)
        {
            if (parent == null)
            {
                return;
            }

            if (string.IsNullOrEmpty(tag) || string.IsNullOrEmpty(parent.Tag))
            {
                return;
            }

            List<string> parentTags;

            if (nonNestedTags.TryGetValue(tag.Trim().ToLower(), out parentTags))
            {
                if (parentTags.Contains(parent.Tag.Trim().ToLower()))
                {
                    parent.SetBoundary(htmlStart, htmlStart);
                    context.PreviousNode = parent;
                    parent = parent.GetParent();
                }
            }
        }