mirror of
https://github.com/xoofx/markdig.git
synced 2026-02-04 13:54:44 +00:00
Help using Markdig with GitHub Flavored Markdown #281
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @mattvarghese on GitHub (Feb 27, 2019).
Hi Folks -
Question
I'm trying to find a Markdown parser that can handle GitHub Flavored Markdown (GFM) in C#. Can Markdig do this? If yes, can you help me with what I am missing?
Currently, my code looks like this:
private string convertMarkDig(string markdown) { MarkdownPipeline pl = new MarkdownPipelineBuilder().UseAutoIdentifiers(AutoIdentifierOptions.GitHub).Build(); return Markdown.ToHtml(markdown, pl); }This still does not handle GFM correctly. For example,
If you can help me figure out how to use Markdig for GFM, that will be much appreciated!
Broader Context
I'm working on implementing the CDS Hooks standard, and one of requirements is that the details for display within a card is coded as Github Flavored Markdown. I need to convert this to HTML.
@MihaZupan commented on GitHub (Feb 27, 2019):
It does. Perhaps you did not use a space after '-'?
@mattvarghese commented on GitHub (Feb 27, 2019):
@MihaZupan, you are correct. That was the issue. Even though the source page had space between "-" and the first char, somehow, when copying into visual studio, that had gotten lost for me.
Copied again, and it works correctly. Thanks 👍