HtmlToMarkdownOptions Class

Options that control how HTML is converted to Markdown.

public sealed class HtmlToMarkdownOptions

Constructors

NameDescription
HtmlToMarkdownOptions()

HtmlToMarkdownOptions()

HtmlToMarkdownOptions.cs
public HtmlToMarkdownOptions()

No documentation is available.

Properties

NameDescription
CodeBlockFenceCharacterGets or sets the fence character used for fenced code blocks.
CodeBlockStyleGets or sets the style used for code blocks.
EmojiShortcodeModeGets or sets how emoji are converted to shortcodes.
EmphasisMarkerGets or sets the marker used for emphasis.
HeadingStyleGets or sets the heading style to use in Markdown output.
LineBreakStyleGets or sets the style used for line breaks.
ThematicBreakGets or sets the thematic break text to emit for horizontal rules.
UnknownElementHandlingGets or sets how unknown HTML elements are handled.
UnorderedListMarkerGets or sets the marker used for unordered lists.
UseSimplePunctuationGets or sets a value indicating whether smart punctuation characters are converted to simple ASCII punctuation.

CodeBlockFenceCharacter

HtmlToMarkdownOptions.cs

Gets or sets the fence character used for fenced code blocks.

public char CodeBlockFenceCharacter { get; set; }

Property value

char

Exceptions

ArgumentOutOfRangeException
The value is neither a backtick nor a tilde.

Gets or sets the style used for code blocks.

public CodeBlockStyle CodeBlockStyle { get; set; }

Property value

CodeBlockStyle

EmojiShortcodeMode

HtmlToMarkdownOptions.cs

Gets or sets how emoji are converted to shortcodes.

public EmojiShortcodeMode EmojiShortcodeMode { get; set; }

Property value

EmojiShortcodeMode

Gets or sets the marker used for emphasis.

public EmphasisMarker EmphasisMarker { get; set; }

Property value

EmphasisMarker

Gets or sets the heading style to use in Markdown output.

public HeadingStyle HeadingStyle { get; set; }

Property value

HeadingStyle

Gets or sets the style used for line breaks.

public LineBreakStyle LineBreakStyle { get; set; }

Property value

LineBreakStyle

Gets or sets the thematic break text to emit for horizontal rules.

public string ThematicBreak { get; set; }

Property value

string

UnknownElementHandling

HtmlToMarkdownOptions.cs

Gets or sets how unknown HTML elements are handled.

public UnknownElementHandling UnknownElementHandling { get; set; }

UnorderedListMarker

HtmlToMarkdownOptions.cs

Gets or sets the marker used for unordered lists.

public char UnorderedListMarker { get; set; }

Property value

char

Exceptions

ArgumentOutOfRangeException
The value is not '-', '*' or '+'.

UseSimplePunctuation

HtmlToMarkdownOptions.cs

Gets or sets a value indicating whether smart punctuation characters are converted to simple ASCII punctuation.

public bool UseSimplePunctuation { get; set; }

Property value

bool