MarkdownDocumentSyntax Class
A Markdown document: its blocks, and the end of the text.
public sealed class MarkdownDocumentSyntax : MarkdownSyntaxNode- Inheritance
MarkdownSyntaxNodeMarkdownDocumentSyntax
Properties
| Name | Description |
|---|---|
| Blocks | Gets the blocks of the document, in the order of the text. |
| EndOfFileToken | Gets the token that ends the document, which holds the trivia after the last block. |
| LinkReferenceDefinitions | Gets the link reference definitions of the document, in the order of the text. |
Gets the blocks of the document, in the order of the text.
public ImmutableArray<MarkdownBlockSyntax> Blocks { get; }Property value
EndOfFileToken
MarkdownDocumentSyntax.csGets the token that ends the document, which holds the trivia after the last block.
public SyntaxToken EndOfFileToken { get; }Property value
LinkReferenceDefinitions
MarkdownDocumentSyntax.csGets the link reference definitions of the document, in the order of the text.
public IEnumerable<MarkdownLinkReferenceDefinitionSyntax> LinkReferenceDefinitions { get; }Property value
Methods
| Name | Description |
|---|---|
| Accept(MarkdownSyntaxVisitor) | |
| Accept<TResult>(MarkdownSyntaxVisitor<TResult>) | |
| FindClosestLine(int) | Finds the line of the block that is the closest to a line, as Markdig does for its pragma lines: an editor scrolls its preview to the element whose id is pragma-line-N, where N is the line that this method returns. |
| GetAbbreviationDefinition(string) | Finds the definition of an abbreviation: the last one with the same label, compared as the text writes it. |
| GetFootnoteDefinition(string) | Finds the definition of a footnote: the first one with the same label, compared as CommonMark compares link labels. |
| GetLinkReferenceDefinition(string) | Finds the definition of a link label: the first one with the same label, compared as CommonMark does. In a cell of a grid table, the definitions of the tree of the table are found too. |
Accept overloads
Accept(MarkdownSyntaxVisitor)
MarkdownDocumentSyntax.cspublic override void Accept(MarkdownSyntaxVisitor visitor)Parameters
visitorMarkdownSyntaxVisitor
No documentation is available.
Accept<TResult>(MarkdownSyntaxVisitor<TResult>)
MarkdownDocumentSyntax.cspublic override TResult? Accept<TResult>(MarkdownSyntaxVisitor<TResult> visitor)No documentation is available.
FindClosestLine(int)
MarkdownDocumentSyntax.csFinds the line of the block that is the closest to a line, as Markdig does for its pragma lines: an editor scrolls its preview to the element whose id is pragma-line-N, where N is the line that this method returns.
GetAbbreviationDefinition(string)
MarkdownDocumentSyntax.csFinds the definition of an abbreviation: the last one with the same label, compared as the text writes it.
public MarkdownAbbreviationDefinitionSyntax? GetAbbreviationDefinition(string label)Parameters
labelstring
Returns
MarkdownAbbreviationDefinitionSyntax?
Exceptions
ArgumentNullExceptionlabelisnull.
GetFootnoteDefinition(string)
MarkdownDocumentSyntax.csFinds the definition of a footnote: the first one with the same label, compared as CommonMark compares link labels.
public MarkdownFootnoteDefinitionSyntax? GetFootnoteDefinition(string label)Parameters
labelstring- The label, with its
^.
Returns
MarkdownFootnoteDefinitionSyntax?
Exceptions
ArgumentNullExceptionlabelisnull.
Remarks
The content of a cell of a grid table has no footnote: its references are to the footnotes of the tree of the table.
GetLinkReferenceDefinition(string)
MarkdownDocumentSyntax.csFinds the definition of a link label: the first one with the same label, compared as CommonMark does. In a cell of a grid table, the definitions of the tree of the table are found too.
public MarkdownLinkReferenceDefinitionSyntax? GetLinkReferenceDefinition(string label)Parameters
labelstring
Returns
MarkdownLinkReferenceDefinitionSyntax?
Exceptions
ArgumentNullExceptionlabelisnull.