MarkdownDelimiterExtension Class
An inline syntax that wraps content between runs of a character, such as %%highlight%%. The runs take part in the processing of emphasis, as MarkdownExtensions.Inserted (++) and MarkdownExtensions.Marked (==) do, so the construct nests with emphasis in both directions. The construct is a MarkdownExtensionInlineSyntax whose markers are the runs and whose inlines are the content.
public sealed class MarkdownDelimiterExtension : MarkdownSyntaxExtensionRemarks
A run opens or closes as a run of * does in CommonMark, a run shorter than MarkdownDelimiterExtension.MinimumCount is text, and a match uses as many characters of the runs as it can, up to MarkdownDelimiterExtension.MaximumCount. The character must not be one that an enabled extension of MarkdownExtensions reads, such as ~ with strikethrough: the parser throws an ArgumentException for such options.
- Inheritance
MarkdownSyntaxExtensionMarkdownDelimiterExtension
Constructors
| Name | Description |
|---|---|
| MarkdownDelimiterExtension(string, char, int, int) | Initializes a new instance of the MarkdownDelimiterExtension class. |
MarkdownDelimiterExtension(string, char, int, int)
MarkdownDelimiterExtension.csInitializes a new instance of the MarkdownDelimiterExtension class.
public MarkdownDelimiterExtension(string name, char character, int minimumCount = 2, int maximumCount = 2)Parameters
namestring- The name of the extension, which the nodes of its constructs have.
characterchar- The character of the runs: ASCII punctuation that CommonMark does not read, such as
%. minimumCountint- The length of the shortest run that is a delimiter.
maximumCountint- The most characters of each run that one construct uses:
minimumCountor more.
Exceptions
ArgumentExceptionnameis empty, orcharacteris not ASCII punctuation, or is one that CommonMark reads.ArgumentNullExceptionnameisnull.ArgumentOutOfRangeExceptionminimumCountis not positive, ormaximumCountis less thanminimumCount.
Properties
| Name | Description |
|---|---|
| Character | Gets the character of the runs. |
| MaximumCount | Gets the most characters of each run that one construct uses. |
| MinimumCount | Gets the length of the shortest run that is a delimiter. |