public Render Visit(HrefNode node) { recursionLevel += 1; var render = new Render(recursionLevel, "href"); recursionLevel -= 1; return(render); }
void IAstVisitor <ParsingContext> .Visit(HrefNode node, ParsingContext context) { Hyperlink h = new Hyperlink(); Run run = new Run() { Text = node.Content.Text }; if (context.Colors.Count > 0) { run.Foreground = context.Colors.Peek(); } h.Inlines.Add(run); var link = node.Content.GetAttribute("href"); link = Regex.Unescape(link); link = link.Substring(1, link.Length - 2); h.NavigateUri = new Uri(link, UriKind.Absolute); context.Stack.Peek().Inlines.Add(h); }
void IAstVisitor <ResolveContext> .Visit(HrefNode node, ResolveContext context) { return; }