Files
markdig/readme.md
Tatsunori Uchino 6d5a124863 Add CJK-friendly Emphasis Extension (#921)
* Add CJK-friendly Emphasis Extension

* Add auto-generated test file

* Add name for configuration

* Remove useless default value assignments

Co-authored-by: Miha Zupan <mihazupan.zupan1@gmail.com>

* Make `CheckOpenCloseDelimiterCjkFriendly` internal only

* Remove `CjkFriendlyEmphasisExtension` class

* Add some comments including links

* Add direct tests on `CharHelper.CheckOpenCloseDelimiterCjkFriendly`

* Fix generated tests

* Add `#if NET`

* Skip Rune-dependent tests in .NET Standard tests

* Add missing XML Documentation Comments

* Fix URL

* Change test condition

* Add test in .NET Framework 4.8.1

* Add netstandard2.0 to SpecFileGen

* Add fallback for netstandard2.0

* Fix

* Revert "Fix"

This reverts commit 42e998b085.

* Revert "Add fallback for netstandard2.0"

This reverts commit 7400a7bb0b.

* Revert "Add netstandard2.0 to SpecFileGen"

This reverts commit f9aa8e1e8d.

* Revert "Add test in .NET Framework 4.8.1"

This reverts commit d8d6d516ed.

* Fix missing indent

---------

Co-authored-by: Miha Zupan <mihazupan.zupan1@gmail.com>
2026-03-01 13:47:54 +01:00

11 KiB

Markdig ci Coverage Status NuGet

Markdig is a fast, powerful, CommonMark compliant, extensible Markdown processor for .NET.

Documentation: https://xoofx.github.io/markdig

You can try Markdig online and compare it to other implementations on babelmark3

Features

If you are looking for support for an old .NET Framework 3.5 or 4.0, you can download Markdig 0.18.3.

Third Party Extensions

Documentation

Full documentation is available at https://xoofx.github.io/markdig — covering getting started, usage, all extensions, and the developer guide for writing custom parsers and renderers.

For detailed specs and corner cases of each extension, see the specs documentation.

For a "behind the scene" article about Markdig, see the blog post "Implementing a Markdown Engine for .NET".

Download

Markdig is available as a NuGet package: NuGet

Also Markdig.Signed NuGet package provides signed assemblies.

Usage

The main entry point for the API is the Markdig.Markdown class:

By default, without any options, Markdig is using the plain CommonMark parser:

var result = Markdown.ToHtml("This is a text with some *emphasis*");
Console.WriteLine(result);   // prints: <p>This is a text with some <em>emphasis</em></p>

In order to activate most of all advanced extensions (except Emoji, SoftLine as HardLine, Bootstrap, YAML Front Matter, JiraLinks and SmartyPants)

// Configure the pipeline with all advanced extensions active
var pipeline = new MarkdownPipelineBuilder().UseAdvancedExtensions().Build();
var result = Markdown.ToHtml("This is a text with some *emphasis*", pipeline);

Try it online!

You can have a look at the MarkdownExtensions that describes all actionable extensions (by modifying the MarkdownPipeline)

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated. For detailed contributing guidelines, please see contributing.md.

Build

In order to build Markdig, you need to install .NET 10.0

License

This software is released under the BSD-Clause 2 license.

Sponsors

Supports this project with a monthly donation and help me continue improving it. [Become a sponsor]

lilith Lilith River, author of Imageflow Server, an easy on-demand image editing, optimization, and delivery server

Credits

Thanks to the fantastic work done by John Mac Farlane for the CommonMark specs and all the people involved in making Markdown a better standard!

This project would not have been possible without this huge foundation.

Thanks also to the project BenchmarkDotNet that makes benchmarking so easy to setup!

Some decoding part (e.g HTML EntityHelper.cs) have been re-used from CommonMark.NET

Thanks to the work done by @clarkd on the JIRA Link extension, now included with this project!

Author

Alexandre MUTEL aka xoofx