示例#1
0
            protected override void Write(SpeeDataRenderer renderer, LiteralInline obj)
            {
                if (obj.Content.IsEmpty)
                {
                    return;
                }

                renderer.WriteText(ref obj.Content);
            }
示例#2
0
 protected override void Write(SpeeDataRenderer renderer, LineBreakInline obj)
 {
     if (obj.IsHard)
     {
         renderer.WriteLineBreak();
     }
     else                 // Soft line break.
     {
         renderer.WriteText(" ");
     }
 }
示例#3
0
            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);
                }
            }
示例#4
0
 protected override void Write(SpeeDataRenderer renderer, AutolinkInline link)
 => renderer.WriteText(link.Url);
示例#5
0
 protected override void Write(SpeeDataRenderer renderer, CodeInline code)
 {
     renderer.WriteStartElement("Span");
     renderer.WriteText(code.Content);
     renderer.WriteEndElement();
 }
示例#6
0
 protected override void Write(SpeeDataRenderer renderer, DelimiterInline obj)
 {
     renderer.WriteText(obj.ToLiteral());
     renderer.WriteChildren(obj);
 }