Monday, November 24, 2014

[C#] How to render GitHub-flavored markdown offline

1. Install Strike.IE package from NuGet.

2. Use the following code to generate HTML from GitHub-flavored markdown:

static public String RenderGithubMarkdow(String markdown)
{
    using (var markdownify = new Strike.IE.Markdownify())
    {
        return markdownify.Transform(markdown);
    }
}

Related posts:
  • The minimal amount of CSS to replicate the GitHub Markdown style
  • How to render GitHub-flavored markdown with GitHub API
  • No comments:

    Post a Comment