Exemplo n.º 1
0
        // 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);
        }
Exemplo n.º 2
0
        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)));
        }
Exemplo n.º 3
0
        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));
        }