CustomAttributeSyntax class

Allows for a toned-down version of custom attributes extension for markdown, inspired by the markdown-it-attrs package.

This allows users to specify a custom class name to a span of text:

[This is a custom class]{.my-custom-class}
This word will be [red]{.red} and this one will be [blue]{.blue}.

This is based on the standard Link markdown parser (which matches the [text](url) and [text][ref] syntaxes).

Constructors

CustomAttributeSyntax()
Creates a new custom attribute syntax.

Properties

allowIntraWord bool
Whether to allow intra-word delimiter runs. CommonMark emphasis and strong emphasis does not allow this, but GitHub-Flavored Markdown allows it on strikethrough.
finalinherited
hashCode int
The hash code for this object.
no setterinherited
linkResolver → Resolver
finalinherited
pattern RegExp
finalinherited
requiresDelimiterRun bool
Whether this is parsed according to the same nesting rules as emphasis delimiters.
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
tags List<DelimiterTag>?
finalinherited

Methods

close(InlineParser parser, covariant SimpleDelimiter opener, Delimiter? closer, {required List<Node> getChildren(), String? tag}) Iterable<Node>?
Attempts to close this tag at the current position.
createNode(String destination, String? title, {required List<Node> getChildren()}) → Node
Create the node represented by a Markdown link.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onMatch(InlineParser parser, Match match) bool
Processes match, adding nodes to parser and possibly advancing parser.
inherited
toString() String
A string representation of this object.
inherited
tryMatch(InlineParser parser, [int? startMatchPos]) bool
Tries to match at the parser's current position.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited