// http://codeblog.vurdalakov.net/2014/11/cs-how-to-render-github-flavored-markdown-with-github-api.html override public string StringToHtml(string sIn) { string parsed_html = _markdown.Transform(sIn); Global.myDebug("calling StrikeIE ...", 2); return("<!-- Stiike.IE -->\n" + parsed_html); }
public ActionResult Page(string folder, string file) { var content = System.IO.File.ReadAllText( Path.Combine(this.AppPath, folder, file + ".md")); content = content.Replace( "![image](~", string.Format("![image]({0}", this.UriPath)); var transformer = new Strike.IE.Markdownify(); string markdown = transformer.Transform(content); //<pre><code class="([a-z]*-[a-z]*)" //<pre class="$1 prettyprint"><code markdown = markdown.Replace("<pre", "<pre class=\"prettyprint\""); return(View(new Models.Page(file, markdown))); }
public ActionResult Page(string folder, string file) { var content = System.IO.File.ReadAllText( Path.Combine(this.AppPath, folder, file + ".md")); content = content.Replace( "![image](~", string.Format("![image]({0}", this.UriPath)); var transformer = new Strike.IE.Markdownify(); string markdown = transformer.Transform(content); //<pre><code class="([a-z]*-[a-z]*)" //<pre class="$1 prettyprint"><code markdown = markdown.Replace("<pre", "<pre class=\"prettyprint\""); return View(new Models.Page(file, markdown)); }