Table of Contents

Class MarkdownHelper

Namespace
SunamoMarkdown
Assembly
SunamoMarkdown.dll

Helper class for converting HTML to Markdown format.

public class MarkdownHelper
Inheritance
MarkdownHelper
Inherited Members
Extension Methods

Methods

ConvertToMarkDown(string)

Converts HTML to Markdown format. Uses Html2Markdown which has dependency HtmlAgilityPack 1.5. Therefore I can't replace with standard 1.11.2 and can't compile these projects. Therefore commented and removed nuget package.

public static string ConvertToMarkDown(string html)

Parameters

html string

The HTML string to convert.

Returns

string

The converted Markdown string.

ReplacePairTag(string, string, string)

Replaces opening and closing HTML tags with specified replacement string.

public static string ReplacePairTag(string text, string tag, string replacement)

Parameters

text string

The text containing HTML tags.

tag string

The HTML tag name to replace (without angle brackets).

replacement string

The string to replace the tags with.

Returns

string

The string with replaced tags.