TopGit theo dõi xoofx/markdig trên GitHub trong nhóm Backend, đã đạt 5.3k sao. A fast, powerful, CommonMark compliant, extensible Markdown processor for .NET
Tóm tắt dựng từ metadata GitHub của chính dự án — chưa có bài review TopGit. Trang sẽ tự động cập nhật khi bài review đầy đủ được xuất bản.
VÌ SAO CHƯA CÓ REVIEW
TopGit viết bài đầy đủ cho repo có nhiều sao nhất và được yêu cầu nhiều nhất. Trang này là snapshot trong thời gian chờ — xem README gốc ở tab READ ME.
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
Very fast parser and html renderer (no-regexp), very lightweight in terms of GC pressure. See benchmarks
Abstract Syntax Tree with precise source code location for syntax tree, useful when building a Markdown editor.
Checkout Markdown Editor v2 for Visual Studio 2022 powered by Markdig!
Converter to HTML
Passing more than 600+ tests from the latest CommonMark specs (0.31.2)
Includes all the core elements of CommonMark:
including GFM fenced code blocks.
Extensible architecture
Even the core Markdown/CommonMark parsing is pluggable, so it allows to disable builtin Markdown/Commonmark parsing (e.g Disable HTML parsing) or change behaviour (e.g change matching # of a headers with @)
Roundtrip support: Parses trivia (whitespace, newlines and other characters) to support lossless parse ⭢ render roundtrip. This enables changing markdown documents without introducing undesired trivia changes.
Pipe tables (inspired from GitHub tables and PanDoc - Pipe Tables)
Grid tables (inspired from Pandoc - Grid Tables)
Extra emphasis (inspired from Pandoc - Emphasis and Markdown-it)
strike through ~~,
Subscript ~
Superscript ^
Inserted ++
Marked ==
Special attributes or attached HTML attributes (inspired from PHP Markdown Extra - Special Attributes)
Definition lists (inspired from PHP Markdown Extra - Definitions Lists)
Footnotes (inspired from PHP Markdown Extra - Footnotes)
Auto-identifiers for headings (similar to Pandoc - Auto Identifiers)
Auto-links generates links if a text starts with http:// or https:// or ftp:// or mailto: or www.xxx.yyy
Task Lists inspired from Github Task lists.
Extra bullet lists, supporting alpha bullet a.b. and roman bullet (i, ii...etc.)
Media support for media url (youtube, vimeo, mp4...etc.) (inspired from this CommonMark discussion)
Abbreviations (inspired from PHP Markdown Extra - Abbreviations)
Citation text by enclosing ""..."" (inspired by this CommonMark discussion )
Custom containers similar to fenced code block ::: for generating a proper <div>...</div> instead (inspired by this CommonMark discussion )
Figures (inspired from this CommonMark discussion)
Footers (inspired from this CommonMark discussion)
Mathematics/Latex extension by enclosing $$ for block and $ for inline math (inspired from this CommonMark discussion)
Soft lines as hard lines
Emoji support (inspired from Markdown-it)
SmartyPants (inspired from Daring Fireball - SmartyPants)
Bootstrap class (to output bootstrap class)
Diagrams extension whenever a fenced code block contains a special keyword, it will be converted to a div block with the content as-is (currently, supports mermaid and nomnoml diagrams)
YAML Front Matter to parse without evaluating the front matter and to discard it from the HTML output (typically used for previewing without the front matter in MarkdownEditor)
JIRA links to automatically generate links for JIRA project references (Thanks to @clarkd: https://github.com/clarkd/MarkdigJiraLinker)
CJK-friendly Emphasis to mitigate a CommonMark specification issue in CJK languages (Thanks to @tats-u: https://github.com/tats-u/markdown-cjk-friendly)
Starting with Markdig version 0.20.0+, Markdig is compatible only with NETStandard 2.0, NETStandard 2.1, NETCoreApp 2.1 and NETCoreApp 3.1.
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
WPF/XAML Markdown Renderer: markdig.wpf
WPF/XAML Markdown Renderer: Neo.Markdig.Xaml
Syntax highlighting: Markdig.SyntaxHighlighting
Syntax highlighting using ColorCode-Universal: Markdown.ColorCode
Syntax highlighting using Prism.js: WebStoating.Markdig.Prism
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:
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 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!
xoofx/markdig thuộc nhóm Backend trên TopGit, cùng 11 topic GitHub. Trang Trending và Topics liệt kê các repo cùng số sao và cùng ngôn ngữ để so sánh.
Đọc thêm về xoofx/markdig ở đâu?
Trang TopGit này là một snapshot — tab "Readme" hiển thị nguyên văn README của repo (đã bỏ link, giữ ảnh). Repo GitHub ở github.com/xoofx/markdig là nguồn chính thức.
Vì sao xoofx/markdig được xếp vào nhóm Backend?
TopGit xếp xoofx/markdig vào nhóm Backend dựa trên GitHub topics và mô tả của repo (gắn thẻ: "commonmark", "commonmark-parsing", "csharp"). Việc phân loại dựa trên metadata thật của repo, không phải đoán theo cảm tính biên tập.
xoofx/markdig có phải mã nguồn mở không?
Có — xoofx/markdig phát hành theo license BSD-2-Clause, nghĩa là mã nguồn mở để đọc, fork và (tùy license) tái sử dụng. Mã: github.com/xoofx/markdig.
xoofx/markdig là gì?
xoofx/markdig (xoofx/markdig) là dự án C# trên GitHub. Theo mô tả gốc: A fast, powerful, CommonMark compliant, extensible Markdown processor for .NET
xoofx/markdig so với các dự án Backend khác thế nào?
xoofx/markdig được TopGit xếp vào nhóm Backend, với 5.3k sao GitHub và viết bằng C#. Xem trang chủ đề Backend trên TopGit để so sánh với các dự án tương tự theo số sao và mức độ hoạt động.
Đọc đầy đủ README ở tab phía trên.
Chưa chắc markdig có hợp với bạn?
Để ChatGPT, Claude hoặc Perplexity tìm hiểu giúp — bấm bên dưới và xem AI nói gì về markdig.