Example #1
0
 private static void AddChildrenNodesInNode(TagZone node, IEnumerable <TagZone> list)
 {
     list = ShiftTags(list, -node.Start - node.Tag.Start.Length);
     AddChildrenNodesInNode(node.TagNode, 0, node.Value.Length, list, node.Value);
 }
Example #2
0
        private static IEnumerable <TagZone> PutChildrenTagFromStack(Stack <TagZone> stack, TagZone tagZone)
        {
            var children = new List <TagZone>();

            while (stack.Count != 0)
            {
                var el = stack.Pop();
                if (el.Start >= tagZone.Start && el.End <= tagZone.End)
                {
                    children.Add(el);
                }
                else
                {
                    stack.Push(el);
                    break;
                }
            }

            children.Reverse();
            return(children);
        }