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 MarkdownFormatInheritance: object → MarkdownFormat
Remarks
Section titled “Remarks”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.
Constructors
Section titled “Constructors”MarkdownFormat()
Section titled “MarkdownFormat()”public MarkdownFormat()Properties
Section titled “Properties”Default
Section titled “Default”Gets the format used when none is given.
public static MarkdownFormat Default { get; }Property Value
Section titled “Property Value”HeaderAnchorStyle
Section titled “HeaderAnchorStyle”Gets or sets the form used to write an explicit header anchor.
public MarkdownHeaderAnchorStyle HeaderAnchorStyle { get; set; }Property Value
Section titled “Property Value”Remarks
Section titled “Remarks”Default: MarkdownHeaderAnchorStyle.HtmlAnchor, which needs no renderer extension.
IgnoredElementTypes
Section titled “IgnoredElementTypes”Gets or sets the element types left out of the output, together with their content.
public ISet<Type> IgnoredElementTypes { get; set; }Property Value
Section titled “Property Value”Remarks
Section titled “Remarks”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.
IsPlainText
Section titled “IsPlainText”Gets a value indicating whether Output is MarkdownOutputKind.PlainText.
public bool IsPlainText { get; }Property Value
Section titled “Property Value”IsReadOnly
Section titled “IsReadOnly”Gets a value indicating whether the instance rejects further changes.
public bool IsReadOnly { get; }Property Value
Section titled “Property Value”Output
Section titled “Output”Gets or sets the syntax the document is written in.
public MarkdownOutputKind Output { get; set; }Property Value
Section titled “Property Value”Remarks
Section titled “Remarks”Default: MarkdownOutputKind.Markdown.
PlainText
Section titled “PlainText”Gets a format that renders plain text instead of Markdown.
public static MarkdownFormat PlainText { get; }Property Value
Section titled “Property Value”SeparateLooseListItems
Section titled “SeparateLooseListItems”Gets or sets a value indicating whether a blank line separates the items of a loose list.
public bool SeparateLooseListItems { get; set; }Property Value
Section titled “Property Value”Remarks
Section titled “Remarks”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.
Methods
Section titled “Methods”IsIgnored(MarkdownElement)
Section titled “IsIgnored(MarkdownElement)”Returns a value indicating whether element is left out of the output.
public bool IsIgnored(MarkdownElement element)Parameters
Section titled “Parameters”elementMarkdownElement
Returns
Section titled “Returns”MakeReadOnly()
Section titled “MakeReadOnly()”Rejects further changes to the instance. Writing a document does this on its own.
public void MakeReadOnly()Exceptions
Section titled “Exceptions”- InvalidOperationException - An ignored type does not derive from MarkdownElement.