Skip to content
项目

mysticmind/reversemarkdown-net

在 GitHub 查看

关于

ReverseMarkdown.Net 是一个用 C# 编写的库,可将 HTML 转换为 Markdown。

网站与应用开发

这些数字如何统计

可以做什么

  • Seven flavors: Default, GitHub, CommonMark, Slack, Telegram, MultiMarkdown and Pandoc.
  • Spec-compliant and fast: 100% CommonMark/GFM round-trips, 2–2.6× faster than v5, Native AOT ready.
  • Extensible: HTML preprocessing, custom readers and a Markdown DOM.

实测星标增长

24小时
0
7天
0
15天
0
1个月
正在收集历史

各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。

README.md

原文

ReverseMarkdown

Build status NuGet Version Docs

Fast, spec-compliant HTML to Markdown converter for .NET, built on AngleSharp's HTML5 parser.

📖 Documentation · Using v5? See the v5 docs.

Find it useful? Sponsor ReverseMarkdown ❤

GitHub Sponsor

Install

dotnet add package ReverseMarkdown

Quick start

var converter = new ReverseMarkdown.Converter();

string markdown = converter.Convert("<p>This is <strong>bold</strong> and <a href=\"https://example.com\">a link</a>.</p>");
// This is **bold** and [a link](https://example.com).

Choose an output flavor (GitHub, CommonMark, Slack, Pandoc and more) with new Converter(new Config { Flavor = Config.MarkdownFlavor.GitHub }). See Getting Started for configuration, TextWriter output and HTML preprocessing.

Features

  • Seven flavors: Default, GitHub, CommonMark, Slack, Telegram, MultiMarkdown and Pandoc.
  • Spec-compliant and fast: 100% CommonMark/GFM round-trips, 2–2.6× faster than v5, Native AOT ready.
  • Extensible: HTML preprocessing, custom readers and a Markdown DOM.

Sponsors

Built and maintained in my spare time. Sponsoring keeps it fast and up to date; Silver sponsors and above get their logo here and on NuGet.

Founding sponsor

ReverseMarkdown is sponsored by Byteful.

Sponsor advertisement: Byteful, ethically sourced proxies, built in the UK. Use code REVERSEMD10 for 10% off.

Sponsored. Claims in the banner are Byteful's own.

Your logo here? Become a sponsor.

Documentation

The full guide lives at mysticmind.github.io/reversemarkdown-net:

Acknowledgements

Inspired by the Ruby converter xijo/reverse_markdown.

License

MIT License. Copyright © Babu Annamalai.

探索相关项目

加载中…