public override void Render(CreoleParser parser, CreoleWriter writer) { var resolvedUrl = parser.ResolveLink(url); var isExternal = resolvedUrl.StartsWith("http://") || resolvedUrl.StartsWith("https://") || resolvedUrl.StartsWith("ftp://"); writer.AppendRaw("<a href=\"{0}\"{1}>", HttpUtility.UrlPathEncode(resolvedUrl), isExternal ? " target=\"_blank\"" : string.Empty); if (parseContent) writer.AppendRaw(parser.ParseInlines(content, TryParse)); else writer.Append(content); writer.AppendRaw("</a>"); }
public override void Render(CreoleParser parser, CreoleWriter writer) { writer.AppendRaw("<pre>"); writer.Append(content); writer.AppendRawLine("</pre>"); }
public override void Render(CreoleParser parser, CreoleWriter writer) { writer.Append(content); }
public override void Render(CreoleParser parser, CreoleWriter writer) { writer.AppendRaw("<h{0}>", level); writer.Append(content); writer.AppendRaw("</h{0}>", level); }