Help using Markdig with GitHub Flavored Markdown #279

Open
opened 2026-01-29 14:32:38 +00:00 by claunia · 0 comments
Owner

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,

  • using the "-" character to make an unordered list in GFM.

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.

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)](https://github.github.com/gfm/) in C#. Can Markdig do this? If yes, can you help me with what I am missing? Currently, my code looks like this: <pre> private string convertMarkDig(string markdown) { MarkdownPipeline pl = new MarkdownPipelineBuilder().UseAutoIdentifiers(AutoIdentifierOptions.GitHub).Build(); return Markdown.ToHtml(markdown, pl); } </pre> This still does not handle GFM correctly. For example, - using the "-" character to make an unordered list in GFM. 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](https://github.com/cds-hooks/docs) standard, and one of requirements is that the [details for display within a card](https://cds-hooks.org/specification/1.0/#card-attributes) is coded as Github Flavored Markdown. I need to convert this to HTML.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/markdig#279