MarkdownParseOptions Class

Configures how MarkdownSyntaxTree parses text.

public sealed class MarkdownParseOptions : IEquatable<MarkdownParseOptions>
Implements

Constructors

NameDescription
MarkdownParseOptions()

MarkdownParseOptions()

MarkdownParseOptions.cs
public MarkdownParseOptions()

No documentation is available.

Properties

NameDescription
AllowNestedAlertsGets a value indicating whether a block quote in a container, such as a list item, can be an alert. By default, only the block quotes of the document are.
AutoIdentifierOptionsGets how MarkdownExtensions.AutoIdentifiers makes the identifiers of the headings.
AutolinkOptionsGets how MarkdownExtensions.MarkdigAutolinks reads the URLs of the text.
DefaultGets the options used when none are given: CommonMark, without extensions.
DisableHtmlGets a value indicating whether HTML is text: no HTML block or inline HTML is recognized, and the renderer escapes it.
EmojiMappingGets the shortcodes and the smileys that MarkdownExtensions.Emoji reads: by default, the shortcodes of GitHub and the common smileys.
ExtensionsGets the extensions to parse.
GitHubFlavoredGets the options of GitHub Flavored Markdown: CommonMark and the extensions of GitHub.
JiraLinksGets where the links of MarkdownExtensions.JiraLinks go.
MaximumNestingDepthGets the number of blocks that a block can be nested in, and of inlines that an inline can be nested in: a block nested in more blocks is text of a paragraph of its container, and an inline nested in more inlines is text of its container. The default is 128.
PipeTableOptionsGets how MarkdownExtensions.PipeTables reads and renders the pipe tables.
SyntaxExtensionsGets the syntaxes that the parser reads in addition to CommonMark and to MarkdownParseOptions.Extensions: inline, delimiter, fenced block and paragraph extensions. On a trigger character, the extensions are tried in order, before the built-in syntaxes, and the paragraph extensions are offered each paragraph in order.

AllowNestedAlerts

MarkdownParseOptions.cs

Gets a value indicating whether a block quote in a container, such as a list item, can be an alert. By default, only the block quotes of the document are.

public bool AllowNestedAlerts { get; init; }

Property value

bool

AutoIdentifierOptions

MarkdownParseOptions.cs

Gets how MarkdownExtensions.AutoIdentifiers makes the identifiers of the headings.

public MarkdownAutoIdentifierOptions AutoIdentifierOptions { get; init; }

Gets how MarkdownExtensions.MarkdigAutolinks reads the URLs of the text.

public MarkdownAutolinkOptions AutolinkOptions { get; init; }

Gets the options used when none are given: CommonMark, without extensions.

public static MarkdownParseOptions Default { get; }

Property value

MarkdownParseOptions

Gets a value indicating whether HTML is text: no HTML block or inline HTML is recognized, and the renderer escapes it.

public bool DisableHtml { get; init; }

Property value

bool

Remarks

Autolinks, such as <https://example.com>, are still links.

Gets the shortcodes and the smileys that MarkdownExtensions.Emoji reads: by default, the shortcodes of GitHub and the common smileys.

public MarkdownEmojiMapping EmojiMapping { get; init; }

Property value

MarkdownEmojiMapping

Gets the extensions to parse.

public MarkdownExtensions Extensions { get; init; }

Property value

MarkdownExtensions

Gets the options of GitHub Flavored Markdown: CommonMark and the extensions of GitHub.

public static MarkdownParseOptions GitHubFlavored { get; }

Property value

MarkdownParseOptions

MaximumNestingDepth

MarkdownParseOptions.cs

Gets the number of blocks that a block can be nested in, and of inlines that an inline can be nested in: a block nested in more blocks is text of a paragraph of its container, and an inline nested in more inlines is text of its container. The default is 128.

public int MaximumNestingDepth { get; init; }

Property value

int

Exceptions

ArgumentOutOfRangeException
The value is less than 1.

Remarks

The limit keeps the tree shallow enough to be built, walked and rendered without exhausting the stack, whatever the text, such as thousands of > or of *. The blocks of the content of a grid table cell are in the table and its containers, so grid tables nested in cells count too. A value greater than 256 is read as 256: deeper blocks with deeper inlines in them would overflow a stack of 1 MB, the default size of the stack of a thread on Windows.

PipeTableOptions

MarkdownParseOptions.cs

Gets how MarkdownExtensions.PipeTables reads and renders the pipe tables.

public MarkdownPipeTableOptions PipeTableOptions { get; init; }

SyntaxExtensions

MarkdownParseOptions.cs

Gets the syntaxes that the parser reads in addition to CommonMark and to MarkdownParseOptions.Extensions: inline, delimiter, fenced block and paragraph extensions. On a trigger character, the extensions are tried in order, before the built-in syntaxes, and the paragraph extensions are offered each paragraph in order.

public ImmutableArray<MarkdownSyntaxExtension> SyntaxExtensions { get; init; }

Property value

ImmutableArray<MarkdownSyntaxExtension>

Exceptions

ArgumentException
The list contains null, an extension twice, two extensions of the same name, two delimiter extensions of the same character, or an extension of another kind.

Remarks

Options with syntax extensions are equal only to their copies made with a with expression that keeps the syntax extensions.

Methods

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

Equals overloads

Equals(MarkdownParseOptions?)

public bool Equals(MarkdownParseOptions? other)
Parameters
other MarkdownParseOptions?
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 ==(MarkdownParseOptions?, MarkdownParseOptions?)
operator !=(MarkdownParseOptions?, MarkdownParseOptions?)

operator ==(MarkdownParseOptions?, MarkdownParseOptions?)

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

No documentation is available.

operator !=(MarkdownParseOptions?, MarkdownParseOptions?)

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

No documentation is available.