Ejemplo n.º 1
0
 public virtual StringBuffer Render(IMarkdownRenderer renderer, MarkdownCodeInlineToken token, MarkdownInlineContext context)
 {
     return((StringBuffer)"<code>" + StringHelper.Escape(token.Content, true) + "</code>");
 }
Ejemplo n.º 2
0
        public virtual StringBuffer Render(IMarkdownRenderer renderer, MarkdownImageInlineToken token, MarkdownInlineContext context)
        {
            var result = (StringBuffer)"<img src=\"" + StringHelper.Escape(token.Href) + "\" alt=\"" + StringHelper.Escape(token.Text) + "\"";

            if (!string.IsNullOrEmpty(token.Title))
            {
                result = result + " title=\"" + StringHelper.Escape(token.Title) + "\"";
            }
            result = AppendSourceInfo(result, renderer, token);

            result += renderer.Options.XHtml ? "/>" : ">";
            return(result);
        }