Exemple #1
0
        private StringBuffer RenderLinkNormalLink(IMarkdownRenderer render, MarkdownLinkInlineToken token, MarkdownInlineContext context)
        {
            StringBuffer content = StringBuffer.Empty;

            content += "[";
            foreach (var t in token.Content)
            {
                content += render.Render(t);
            }
            content += "](";
            content += StringHelper.EscapeMarkdownHref(token.Href);
            if (!string.IsNullOrEmpty(token.Title))
            {
                content += " \"";
                if (render.Options.LegacyMode)
                {
                    content += StringHelper.LegacyEscapeMarkdown(token.Title);
                }
                else
                {
                    content += StringHelper.EscapeMarkdown(token.Title);
                }
                content += "\"";
            }
            content += ")";
            return(content);
        }
Exemple #2
0
        private StringBuffer RenderAutoLink(IMarkdownRenderer render, MarkdownLinkInlineToken token, MarkdownInlineContext context)
        {
            StringBuffer content = StringBuffer.Empty;

            content += "<";
            content += StringHelper.EscapeMarkdownHref(token.Href);
            content += ">";
            return(content);
        }
Exemple #3
0
 private StringBuffer RenderUrlLink(IMarkdownRenderer render, MarkdownLinkInlineToken token, MarkdownInlineContext context)
 {
     return(StringHelper.EscapeMarkdownHref(token.Href));
 }