LinkInline Class

A Link inline (Section 6.5 CommonMark specs)

public class LinkInline : ContainerInline
Inheritance
ContainerInline LinkInline

Nested types

NameDescription
LinkInline.GetUrlDelegateA delegate to use if it is setup on this instance to allow late binding of a Url.

Constructors

NameDescription
LinkInline()Initializes a new instance of the LinkInline class.
LinkInline(string, string)Initializes a new instance of the LinkInline class.

LinkInline overloads

LinkInline()

LinkInline.cs

Initializes a new instance of the LinkInline class.

public LinkInline()

LinkInline(string, string)

LinkInline.cs

Initializes a new instance of the LinkInline class.

public LinkInline(string url, string title)
Parameters
url string
The URL.
title string
The title.

Properties

NameDescription
GetDynamicUrlGets or sets the GetDynamicUrl delegate. If this property is set, it is used instead of LinkInline.Url to get the Url from this instance.
IsAutoLinkGets or sets a boolean indicating whether the inline link was parsed using markdown syntax or was automatic recognized.
IsImageGets or sets a value indicating whether this instance is an image link.
IsShortcutGets or sets a boolean indicating if this link is a shortcut link to a LinkReferenceDefinition
LabelGets or sets the label.
LabelWithTriviaGets or sets the LinkInline.Label with trivia. Trivia: only parsed when MarkdownPipeline.TrackTrivia is enabled, otherwise StringSlice.Empty.
LinkRefDefLabelGets or sets the label as matched against the LinkReferenceDefinition. Trivia: only parsed when MarkdownPipeline.TrackTrivia is enabled.
LinkRefDefLabelWithTriviaGets or sets the LinkInline.LinkRefDefLabel with trivia as matched against the LinkReferenceDefinition
LocalLabelGets or sets the type of label parsed Trivia: only parsed when MarkdownPipeline.TrackTrivia is enabled, otherwise LocalLabel.None.
ReferenceGets or sets the reference this link is attached to. May be null.
TitleGets or sets the title.
TitleEnclosingCharacterGets or sets the character used to enclose the LinkInline.Title. Trivia: only parsed when MarkdownPipeline.TrackTrivia is enabled.
TriviaAfterTitleGets or sets the trivia after the LinkInline.Title. Trivia: only parsed when MarkdownPipeline.TrackTrivia is enabled, otherwise StringSlice.Empty.
TriviaAfterUrlAny trivia after the LinkInline.Url. Trivia: only parsed when MarkdownPipeline.TrackTrivia is enabled, otherwise StringSlice.Empty.
TriviaBeforeUrlGets or sets the trivia before the LinkInline.Url. Trivia: only parsed when MarkdownPipeline.TrackTrivia is enabled, otherwise StringSlice.Empty.
UnescapedTitleGets or sets the LinkInline.Title exactly as parsed from the source document including unescaped characters Trivia: only parsed when MarkdownPipeline.TrackTrivia is enabled, otherwise StringSlice.Empty.
UnescapedUrlThe LinkInline.Url but with trivia and unescaped characters Trivia: only parsed when MarkdownPipeline.TrackTrivia is enabled, otherwise StringSlice.Empty.
UrlGets or sets the URL.
UrlHasPointyBracketsTrue if the LinkInline.Url in the source document is enclosed in pointy brackets. Trivia: only parsed when MarkdownPipeline.TrackTrivia is enabled, otherwise false.

GetDynamicUrl

LinkInline.cs

Gets or sets the GetDynamicUrl delegate. If this property is set, it is used instead of LinkInline.Url to get the Url from this instance.

public LinkInline.GetUrlDelegate? GetDynamicUrl { get; set; }

Gets or sets a value indicating whether this instance is an image link.

public bool IsImage { get; set; }

Property value

bool

IsShortcut

LinkInline.cs

Gets or sets a boolean indicating if this link is a shortcut link to a LinkReferenceDefinition

public bool IsShortcut { get; set; }

Property value

bool

Gets or sets the label.

public string? Label { get; set; }

Property value

string?

LabelWithTrivia

LinkInline.cs

Gets or sets the LinkInline.Label with trivia. Trivia: only parsed when MarkdownPipeline.TrackTrivia is enabled, otherwise StringSlice.Empty.

public StringSlice LabelWithTrivia { get; set; }

Property value

StringSlice

LinkRefDefLabel

LinkInline.cs

Gets or sets the label as matched against the LinkReferenceDefinition. Trivia: only parsed when MarkdownPipeline.TrackTrivia is enabled.

public string? LinkRefDefLabel { get; set; }

Property value

string?

LinkRefDefLabelWithTrivia

LinkInline.cs

Gets or sets the LinkInline.LinkRefDefLabel with trivia as matched against the LinkReferenceDefinition

public StringSlice LinkRefDefLabelWithTrivia { get; set; }

Property value

StringSlice

LocalLabel

LinkInline.cs

Gets or sets the type of label parsed Trivia: only parsed when MarkdownPipeline.TrackTrivia is enabled, otherwise LocalLabel.None.

public LocalLabel LocalLabel { get; set; }

Property value

LocalLabel

Reference

LinkInline.cs

Gets or sets the reference this link is attached to. May be null.

public LinkReferenceDefinition? Reference { get; set; }

Gets or sets the title.

public string? Title { get; set; }

Property value

string?

TitleEnclosingCharacter

LinkInline.cs

Gets or sets the character used to enclose the LinkInline.Title. Trivia: only parsed when MarkdownPipeline.TrackTrivia is enabled.

public char TitleEnclosingCharacter { get; set; }

Property value

char

TriviaAfterTitle

LinkInline.cs

Gets or sets the trivia after the LinkInline.Title. Trivia: only parsed when MarkdownPipeline.TrackTrivia is enabled, otherwise StringSlice.Empty.

public StringSlice TriviaAfterTitle { get; set; }

Property value

StringSlice

TriviaAfterUrl

LinkInline.cs

Any trivia after the LinkInline.Url. Trivia: only parsed when MarkdownPipeline.TrackTrivia is enabled, otherwise StringSlice.Empty.

public StringSlice TriviaAfterUrl { get; set; }

Property value

StringSlice

TriviaBeforeUrl

LinkInline.cs

Gets or sets the trivia before the LinkInline.Url. Trivia: only parsed when MarkdownPipeline.TrackTrivia is enabled, otherwise StringSlice.Empty.

public StringSlice TriviaBeforeUrl { get; set; }

Property value

StringSlice

UnescapedTitle

LinkInline.cs

Gets or sets the LinkInline.Title exactly as parsed from the source document including unescaped characters Trivia: only parsed when MarkdownPipeline.TrackTrivia is enabled, otherwise StringSlice.Empty.

public StringSlice UnescapedTitle { get; set; }

Property value

StringSlice

UnescapedUrl

LinkInline.cs

The LinkInline.Url but with trivia and unescaped characters Trivia: only parsed when MarkdownPipeline.TrackTrivia is enabled, otherwise StringSlice.Empty.

public StringSlice UnescapedUrl { get; set; }

Property value

StringSlice

Gets or sets the URL.

public string? Url { get; set; }

Property value

string?

UrlHasPointyBrackets

LinkInline.cs

True if the LinkInline.Url in the source document is enclosed in pointy brackets. Trivia: only parsed when MarkdownPipeline.TrackTrivia is enabled, otherwise false.

public bool UrlHasPointyBrackets { get; set; }

Property value

bool

Fields

NameDescription
LabelSpanThe label span
TitleSpanThe title source span.
UrlSpanThe URL source span.

LabelSpan

The label span

public SourceSpan LabelSpan

TitleSpan

The title source span.

public SourceSpan TitleSpan

UrlSpan

The URL source span.

public SourceSpan UrlSpan