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 Tuple <string, List <string> > GetHtmlWithUrls(this string md, string baseUrl = null) { var texReplacer = new EdxTexReplacer(md); var markdown = new Markdown2(baseUrl, false) { NewWindowForExternalLinks = true, ExtraMode = true, SafeMode = false, MarkdownInHtml = false, }; var relativeUrls = new List <string>(); markdown.RelativeUrl += relativeUrls.Add; var html = markdown.Transform(texReplacer.ReplacedText); return(Tuple.Create(texReplacer.PlaceTexInsertsBack(html), relativeUrls)); }
public static Tuple<string, List<string>> GetHtmlWithUrls(this string md, string baseUrl = null) { var texReplacer = new EdxTexReplacer(md); var markdown = new Markdown2(baseUrl, false) { NewWindowForExternalLinks = true, ExtraMode = true, SafeMode = false, MarkdownInHtml = false, }; var relativeUrls = new List<string>(); markdown.RelativeUrl += relativeUrls.Add; var html = markdown.Transform(texReplacer.ReplacedText); return Tuple.Create(texReplacer.PlaceTexInsertsBack(html), relativeUrls); }