protected override void OnBeforeWriteLinkInline(Markdig.Syntax.Inlines.LinkInline linkInline) { if (linkInline.IsImage) { linkInline.Url = $"{ImageBase}/{linkInline.Url}"; } else { linkInline.Url = $"{LinkBase}/{linkInline.Url}"; } }
protected override void Write(Markdig.Renderers.WpfRenderer renderer, Markdig.Syntax.Inlines.LinkInline link) { if (link?.IsImage ?? throw new ArgumentNullException(nameof(link))) { if (!new Uri(link.Url, UriKind.RelativeOrAbsolute).IsAbsoluteUri) { Uri u = new Uri(_linkpath, link.Url); link.Url = u.AbsoluteUri; } } base.Write(renderer, link); }
protected virtual void OnBeforeWriteLinkInline(Markdig.Syntax.Inlines.LinkInline linkInline) { }