public static HtmlString RenderTex(this string textWithTex) { var texReplacer = new TexReplacer(textWithTex); string html = HttpUtility.HtmlEncode(texReplacer.ReplacedText); return(new HtmlString(texReplacer.PlaceTexInsertsBack(html))); }
public static string RenderMd(this string md, string baseUrl = null) { var texReplacer = new TexReplacer(md); var markdown = new Markdown2(baseUrl) { NewWindowForExternalLinks = true, ExtraMode = true, SafeMode = false, MarkdownInHtml = false }; var html = markdown.Transform(texReplacer.ReplacedText); return texReplacer.PlaceTexInsertsBack(html); }
public static string RenderMd(this string md, string baseUrl = null) { var texReplacer = new TexReplacer(md); var markdown = new Markdown2(baseUrl) { NewWindowForExternalLinks = true, ExtraMode = true, SafeMode = false, MarkdownInHtml = false }; var html = markdown.Transform(texReplacer.ReplacedText); return(texReplacer.PlaceTexInsertsBack(html)); }
public static string RenderMd(this string md, string baseUrlForRelativeLinks = null) { var texReplacer = new TexReplacer(md); var markdown = new Markdown { NewWindowForExternalLinks = true, ExtraMode = true, SafeMode = false, MarkdownInHtml = false, UrlBaseLocation = baseUrlForRelativeLinks, }; markdown.FormatCodeBlock += FormatCodePrettyPrint; var html = markdown.Transform(texReplacer.ReplacedText); return(texReplacer.PlaceTexInsertsBack(html)); }
public static HtmlString RenderTex(this string textWithTex) { var texReplacer = new TexReplacer(textWithTex); string html = HttpUtility.HtmlEncode(texReplacer.ReplacedText); return new HtmlString(texReplacer.PlaceTexInsertsBack(html)); }