DescriptionListSyntax class final
A custom block syntax for parsing description lists with package:markdown.
Description lists, sometimes known as definition lists,
are composed of terms and their descriptions.
Terms are written on their own lines, and descriptions are
written on the following lines, starting with a colon and a space (: ).
For example, the following description list with two terms:
First term
: This is a description of the first term.
Second term
: This is one description of the second term.
: This is another description of the second term.
Renders to the following HTML:
<dl>
<dt>First term</dt>
<dd><p>This is a description of the first term.</p></dd>
<dt>Second term</dt>
<dd><p>This is one description of the second term.</p></dd>
<dd><p>This is another description of the second term.</p></dd>
</dl>
Constructors
- DescriptionListSyntax({int maxTermsPerDescription = 5})
-
Creates a new DescriptionListSyntax.
const
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- maxTermsPerDescription → int
-
The maximum number of consecutive terms to
associate with a single description.
final
- pattern → RegExp
-
Gets the regex used to identify the beginning of this block, if any.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
canEndBlock(
BlockParser parser) → bool -
inherited
-
canParse(
BlockParser parser) → bool -
interruptedBy(
BlockParser parser) → BlockSyntax? -
Returns the block which interrupts current syntax parsing if there is one,
otherwise returns
null.inherited -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
parse(
BlockParser parser) → Node? -
parseChildLines(
BlockParser parser) → List< Line?> -
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
isValidTerm(
String content) → bool -
Checks if the specified
contentis a valid term for a description list.