Skip to content

Migrate from v5

v6 is a rewrite of the conversion engine, but the public surface stays largely source-compatible: the old Config members remain as [Obsolete] shims that forward to the new grouped members. Existing code keeps compiling (with deprecation warnings guiding you to the new API).

Engine

  • HTML is now parsed with AngleSharp (HTML5-compliant) instead of HtmlAgilityPack, and rendered through per-flavor writers over an intermediate Markdown DOM.
  • Custom converters written against the v5 HtmlNode/IConverter model no longer apply. Use the v6 reader/writer model instead - IMdReader + [MarkdownReader], or the Parse/Render DOM.

Config reorganization

Options are now grouped. The former flat properties are obsolete aliases:

v5 (obsolete)v6
SmartHrefHandlingLinks.SmartHref
WhitelistUriSchemesLinks.WhitelistedSchemes
TableWithoutHeaderRowHandlingTables.WithoutHeaderRow
TableHeaderColumnSpanHandlingTables.HeaderColumnSpans
UnknownTagsTags.Unknown
UnknownTagsReplacerTags.Replacer
TagAliasesTags.Aliases
PassThroughTagsTags.PassThrough
Base64ImagesImages.Base64Handling
Base64ImageSaveDirectoryImages.Base64Directory
Base64ImageFileNameGeneratorImages.Base64FileName
LazyImageSrcFallbackImages.LazySrcFallback
LazyImageSourceAttributesImages.LazySourceAttributes
CleanupUnnecessarySpacesFormatting.CleanupSpaces
SuppressDivNewlinesFormatting.SuppressDivNewlines
RemoveCommentsFormatting.RemoveComments
ConvertPreContentAsHtmlFormatting.PreAsHtml
EscapeMarkdownLineStartsFormatting.EscapeLineStarts
OutputLineEndingFormatting.OutputLineEnding
ListBulletCharFormatting.ListBulletChar
DefaultCodeBlockLanguageFormatting.DefaultCodeBlockLanguage

Flavor model

  • Flavor (the MarkdownFlavor enum) is now the single, canonical flavor selector.
  • SlackFlavored, TelegramMarkdownV2, and CommonMark are obsolete aliases of Flavor.
  • GithubFlavored stays distinct - it produces clean GFM markdown on the default writer and is not the same as Flavor = MarkdownFlavor.GitHub (the CommonMark-based GitHub writer, which preserves raw HTML). See GitHub.

Target frameworks

v6 targets netstandard2.0;net8.0;net9.0;net10.0. The netstandard2.0 target restores support for .NET Framework 4.6.1+, .NET Core 2.0+, Mono, and Unity. The HtmlAgilityPack dependency is removed (replaced by AngleSharp).

Released under the MIT License.