ReverseMarkdown 6.2.1

dotnet add package ReverseMarkdown --version 6.2.1
                    
NuGet\Install-Package ReverseMarkdown -Version 6.2.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.

                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.

                    
Directory.Packages.props

                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add ReverseMarkdown --version 6.2.1
                    
#r "nuget: ReverseMarkdown, 6.2.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package ReverseMarkdown@6.2.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=ReverseMarkdown&version=6.2.1
                    
Install as a Cake Addin
#tool nuget:?package=ReverseMarkdown&version=6.2.1
                    
Install as a Cake Tool

Meet ReverseMarkdown

ReverseMarkdown logo

Build status NuGet Version Docs

ReverseMarkdown is a HTML to Markdown converter library in C#. v6 uses AngleSharp's HTML5-compliant parser and a Markdown DOM pipeline for reliable, performant conversion.

📖 Full documentation: mysticmind.github.io/reversemarkdown-net

Using v5.x? See the v5.x documentation.

If you have used and benefitted from this library, please feel free to sponsor me!

GitHub Sponsor

Install

dotnet add package ReverseMarkdown

Quick start

var converter = new ReverseMarkdown.Converter();

string html = "This a sample paragraph from my site";

string result = converter.Convert(html);
// This a sample **paragraph** from [my site](http://test.com)

With configuration and a flavor:

var config = new ReverseMarkdown.Config
{
    Flavor = Config.MarkdownFlavor.GitHub,
    Formatting = { RemoveComments = true },
    Links = { SmartHref = true },
};

var converter = new ReverseMarkdown.Converter(config);

Real-world HTML often needs cleaning up first. Config.Preprocess is a chainable pipeline applied to the source markup before it converts:

var config = new ReverseMarkdown.Config();
config.Preprocess
    .RemoveScripts()                        //