MarkdownFormattingOptions Class

Configures how MarkdownFormatter writes a document.

public sealed class MarkdownFormattingOptions : IEquatable<MarkdownFormattingOptions>
Implements

Constructors

NameDescription
MarkdownFormattingOptions()

MarkdownFormattingOptions()

MarkdownFormattingOptions.cs
public MarkdownFormattingOptions()

No documentation is available.

Properties

NameDescription
AlignTablesGets a value indicating whether the cells of the tables are padded so that their pipes are aligned in a monospace editor, where a wide character, such as a CJK ideograph or an emoji, uses two columns, and a combining mark none. The default is true. The pipe tables whose delimiter row gives the widths of the columns, with MarkdownPipeTableOptions.InferColumnWidthsFromSeparator, and the tables without a delimiter row are kept.
BulletListMarkerGets the marker of the items of the bullet lists: -, the default, * or +, or null to keep the marker of each list.
CodeFenceCharacterGets the character of the fences of the code blocks: `, the default, or ~. A code block whose info string has a backtick is fenced with ~.
DefaultGets the options used when none are given.
NewLineGets the line ending of the lines: "\n", "\r\n" or "\r", or null, the default, for the first line ending of the document, or "\n" when it has a single line.
RenumberOrderedListsGets a value indicating whether the items of an ordered list are numbered from the number of the first one, which is the only one that changes the HTML. The default is true. The letters and the roman numbers of MarkdownExtensions.ListExtras are kept.
ThematicBreakCharacterGets the character of the thematic breaks: -, the default, * or _. A thematic break that follows a block without a blank line is written with *, as --- would make a paragraph before it a heading, and a thematic break that starts a list item is written with _, as - --- is a thematic break.
UseAtxHeadingsGets a value indicating whether the setext headings, which are underlined, are written as ATX headings, which start with #. The default is true. A setext heading of several lines stays a setext heading.
UseFencedCodeBlocksGets a value indicating whether the indented code blocks are written as fenced code blocks. The default is true.

Gets a value indicating whether the cells of the tables are padded so that their pipes are aligned in a monospace editor, where a wide character, such as a CJK ideograph or an emoji, uses two columns, and a combining mark none. The default is true. The pipe tables whose delimiter row gives the widths of the columns, with MarkdownPipeTableOptions.InferColumnWidthsFromSeparator, and the tables without a delimiter row are kept.

public bool AlignTables { get; init; }

Property value

bool

Gets the marker of the items of the bullet lists: -, the default, * or +, or null to keep the marker of each list.

public char? BulletListMarker { get; init; }

Property value

char?

Remarks

Two lists that follow each other are one list when their markers are the same, and a list item whose text is made of dashes is a thematic break: such a list gets another marker.

Gets the character of the fences of the code blocks: `, the default, or ~. A code block whose info string has a backtick is fenced with ~.

public char CodeFenceCharacter { get; init; }

Property value

char

Gets the options used when none are given.

public static MarkdownFormattingOptions Default { get; }

Gets the line ending of the lines: "\n", "\r\n" or "\r", or null, the default, for the first line ending of the document, or "\n" when it has a single line.

public string? NewLine { get; init; }

Property value

string?

RenumberOrderedLists

MarkdownFormattingOptions.cs

Gets a value indicating whether the items of an ordered list are numbered from the number of the first one, which is the only one that changes the HTML. The default is true. The letters and the roman numbers of MarkdownExtensions.ListExtras are kept.

public bool RenumberOrderedLists { get; init; }

Property value

bool

ThematicBreakCharacter

MarkdownFormattingOptions.cs

Gets the character of the thematic breaks: -, the default, * or _. A thematic break that follows a block without a blank line is written with *, as --- would make a paragraph before it a heading, and a thematic break that starts a list item is written with _, as - --- is a thematic break.

public char ThematicBreakCharacter { get; init; }

Property value

char

Gets a value indicating whether the setext headings, which are underlined, are written as ATX headings, which start with #. The default is true. A setext heading of several lines stays a setext heading.

public bool UseAtxHeadings { get; init; }

Property value

bool

UseFencedCodeBlocks

MarkdownFormattingOptions.cs

Gets a value indicating whether the indented code blocks are written as fenced code blocks. The default is true.

public bool UseFencedCodeBlocks { get; init; }

Property value

bool

Methods

NameDescription
Equals(MarkdownFormattingOptions?)
Equals(object?)
GetHashCode()
ToString()

Equals overloads

Equals(MarkdownFormattingOptions?)

public bool Equals(MarkdownFormattingOptions? other)
Parameters
other MarkdownFormattingOptions?
Returns

bool

No documentation is available.

Equals(object?)

public override bool Equals(object? obj)
Parameters
obj object?
Returns

bool

No documentation is available.

GetHashCode()

public override int GetHashCode()

Returns

int

No documentation is available.

ToString()

public override string ToString()

Returns

string

No documentation is available.

Operators

NameDescription
operator ==(MarkdownFormattingOptions?, MarkdownFormattingOptions?)
operator !=(MarkdownFormattingOptions?, MarkdownFormattingOptions?)

operator ==(MarkdownFormattingOptions?, MarkdownFormattingOptions?)

public static bool operator ==(MarkdownFormattingOptions? left, MarkdownFormattingOptions? right)

No documentation is available.

operator !=(MarkdownFormattingOptions?, MarkdownFormattingOptions?)

public static bool operator !=(MarkdownFormattingOptions? left, MarkdownFormattingOptions? right)

No documentation is available.