MarkdownHeader
Namespace: TagBites.Text.Markdown
Assembly: TagBites.Text.Markdown.dll
Product: TagBites.Text.Markdown v. 2.2.0
A header, written with the # marker.
public class MarkdownHeader : TagBites.Text.Markdown.MarkdownElement, TagBites.Text.Markdown.IMarkdownLinkTargetInheritance: object → MarkdownElement → MarkdownHeader
Remarks
Section titled “Remarks”Markdown has no header below level six. A deeper one becomes bold text followed by a hard line break, which reads as a header in every renderer.
Constructors
Section titled “Constructors”MarkdownHeader(MarkdownText)
Section titled “MarkdownHeader(MarkdownText)”Creates a header whose level follows the section nesting.
public MarkdownHeader(MarkdownText text)Parameters
Section titled “Parameters”textMarkdownText
MarkdownHeader(int, MarkdownText)
Section titled “MarkdownHeader(int, MarkdownText)”Creates a header with an explicit level, between one and six.
public MarkdownHeader(int level, MarkdownText text)Parameters
Section titled “Parameters”levelinttextMarkdownText
Properties
Section titled “Properties”AnchorId
Section titled “AnchorId”Gets the identifier the header is linked to, or null when the text carries no letter or digit.
public virtual string AnchorId { get; }Property Value
Section titled “Property Value”Remarks
Section titled “Remarks”Falls back to the text in lower case with white space turned into a hyphen, which is what a renderer derives.
CustomId
Section titled “CustomId”Gets or sets the explicit anchor of the header.
public string CustomId { get; set; }Property Value
Section titled “Property Value”Remarks
Section titled “Remarks”MarkdownFormat.HeaderAnchorStyle decides how the anchor is written. The property drops a leading #.
Gets or sets the level of the header, or null when it follows the section nesting.
public int? Level { get; set; }Property Value
Section titled “Property Value”int?
Gets or sets the text of the header.
public virtual MarkdownText Text { get; set; }Property Value
Section titled “Property Value”Methods
Section titled “Methods”Resolve(MarkdownRenderer)
Section titled “Resolve(MarkdownRenderer)”Writes the element into renderer.
protected internal virtual void Resolve(MarkdownRenderer renderer)Parameters
Section titled “Parameters”rendererMarkdownRenderer
SetCustomId(string)
Section titled “SetCustomId(string)”Gets or sets the explicit anchor of the header.
public MarkdownHeader SetCustomId(string customId)Parameters
Section titled “Parameters”customIdstring
Returns
Section titled “Returns”Remarks
Section titled “Remarks”MarkdownFormat.HeaderAnchorStyle decides how the anchor is written. The property drops a leading #.