CommonMark
Enable CommonMark-focused output with CommonMark:
cs
var config = new ReverseMarkdown.Config
{
CommonMark = true
};
var converter = new ReverseMarkdown.Converter(config);This mode applies CommonMark-focused rules and is useful when you need output that round-trips predictably through a CommonMark parser. To keep tricky emphasis and link cases unambiguous, it may emit inline HTML for those constructs.
Related options
CommonMarkUseHtmlInlineTags(defaulttrue) - when CommonMark is enabled, emit HTML for inline tags (em,strong,a,img) to avoid delimiter edge cases. Set tofalseto force pure markdown output.CommonMarkIntrawordEmphasisSpacing(defaultfalse) - insert spaces to avoid intraword emphasis, sohe<strong>ll</strong>obecomeshe **ll** o.
cs
var config = new ReverseMarkdown.Config
{
CommonMark = true,
CommonMarkUseHtmlInlineTags = false,
CommonMarkIntrawordEmphasisSpacing = true
};Combine with care
CommonMark is best used on its own. Combining CommonMark with GithubFlavored can produce mixed output; keep them separate unless you explicitly want that behavior.
v6
v6 has a dedicated, round-trip-faithful CommonMark writer (651/651 spec examples). See the v6 CommonMark page.
