protected override void Write(SpeeDataRenderer renderer, LiteralInline obj) { if (obj.Content.IsEmpty) { return; } renderer.WriteText(ref obj.Content); }
protected override void Write(SpeeDataRenderer renderer, LineBreakInline obj) { if (obj.IsHard) { renderer.WriteLineBreak(); } else // Soft line break. { renderer.WriteText(" "); } }
protected override void Write(SpeeDataRenderer renderer, LinkInline link) { var url = link.GetDynamicUrl != null?link.GetDynamicUrl() ?? link.Url : link.Url; if (link.IsImage) { //if (!Uri.IsWellFormedUriString(url, UriKind.RelativeOrAbsolute)) // url = "#"; //renderer.WriteStartObject(typeof(Image)); //renderer.WriteStaticResourceMember(null, "markdig:Styles.ImageStyleKey"); //if (!String.IsNullOrEmpty(link.Title)) // renderer.WriteMember(ToolTipService.ToolTipProperty, link.Title); //renderer.WriteMember(Image.SourceProperty, new Uri(url, UriKind.RelativeOrAbsolute)); //renderer.WriteEndObject(); } else { renderer.WriteText(link.Title); } }
protected override void Write(SpeeDataRenderer renderer, AutolinkInline link) => renderer.WriteText(link.Url);
protected override void Write(SpeeDataRenderer renderer, CodeInline code) { renderer.WriteStartElement("Span"); renderer.WriteText(code.Content); renderer.WriteEndElement(); }
protected override void Write(SpeeDataRenderer renderer, DelimiterInline obj) { renderer.WriteText(obj.ToLiteral()); renderer.WriteChildren(obj); }