public DomItem(string value, DomItem parent, MarkdownParser recursiveParser) { this.Value = value; this.Parent = parent; this.Children = new List <DomItem>(); this.UniqueKey = "{{{" + Guid.NewGuid().ToString() + "}}}"; if (!this.IsPreFormatted && recursiveParser != null) { recursiveParser.ParseRecursive(this); } }
public void AddChild(DomItem child) { this.Children.Add(child); this.Value = this.Value.Replace(child.FullMatchValue, child.UniqueKey); }