예제 #1
0
 private void FixLinks(MarkdownDocument document)
 {
     foreach (var item in document.Descendants().OfType <LinkInline>())
     {
         LinkInline link = (LinkInline)item;
         if (item.IsImage)
         {
             ImageEventArgs args = new ImageEventArgs(link.Url, link.Url, link.Label, link.Label);
             ImageParsed?.Invoke(this, args);
             link.Url = args.Src;
         }
         else
         {
             LinkEventArgs args = new LinkEventArgs(link.Url, link.Url, link.Label, "");
             LinkParsed?.Invoke(this, args);
             link.Url = args.Href;
         }
     }
 }
예제 #2
0
 protected virtual PageView OnLinkParsed(string arg1, string arg2)
 {
     return(LinkParsed?.Invoke(arg1, arg2));
 }