Skip to content
Auto
Products

MarkdownFormat

Namespace: TagBites.Text.Markdown
Assembly: TagBites.Text.Markdown.dll
Product: TagBites.Text.Markdown v. 2.2.0

Controls how a document is written out.

public sealed class MarkdownFormat

Inheritance: object → MarkdownFormat

Holds the choices that depend on the target renderer, not on the content of the document. The instance becomes read-only the first time it is used for writing, so a format shared between threads cannot change.

public MarkdownFormat()

Gets the format used when none is given.

public static MarkdownFormat Default { get; }

MarkdownFormat

Gets or sets the form used to write an explicit header anchor.

public MarkdownHeaderAnchorStyle HeaderAnchorStyle { get; set; }

MarkdownHeaderAnchorStyle

Default: MarkdownHeaderAnchorStyle.HtmlAnchor, which needs no renderer extension.

Gets or sets the element types left out of the output, together with their content.

public ISet<Type> IgnoredElementTypes { get; set; }

ISet<Type>

A type also covers the types that derive from it. Inline content belongs to the text of an element, so the format never leaves it out. Ignoring MarkdownCode drops code blocks and keeps a code span inside a sentence.

Gets a value indicating whether Output is MarkdownOutputKind.PlainText.

public bool IsPlainText { get; }

bool

Gets a value indicating whether the instance rejects further changes.

public bool IsReadOnly { get; }

bool

Gets or sets the syntax the document is written in.

public MarkdownOutputKind Output { get; set; }

MarkdownOutputKind

Default: MarkdownOutputKind.Markdown.

Gets a format that renders plain text instead of Markdown.

public static MarkdownFormat PlainText { get; }

MarkdownFormat

Gets or sets a value indicating whether a blank line separates the items of a loose list.

public bool SeparateLooseListItems { get; set; }

bool

A list is loose when an item holds a block other than a nested item, such as a paragraph or a table. Default: true, which is the form a renderer writes. Plain text output is not affected.

Returns a value indicating whether element is left out of the output.

public bool IsIgnored(MarkdownElement element)

bool

Rejects further changes to the instance. Writing a document does this on its own.

public void MakeReadOnly()