MarkdownInlineUpstreamSyntaxReaction class
An EditReaction that finds inline Markdown syntax immediately upstream from the caret and converts it into attributions.
Inline Markdown syntax includes things like **token** for bold, *token* for
italics, ~token~ for strikethrough, and [name](url) for links.
When this reaction finds inline Markdown syntax, that syntax is removed when the corresponding attribution is applied. For example, "bold" becomes "bold" with a bold attribution applied to it.
This reaction only identifies spans of Markdown styles within individual TextNodes, which immediately precedes the caret. For example, "Hello bold|" will apply the bold style, but "Hello bold wo|" won't apply bold.
Parsing of links is handled differently than all other upstream syntax. Links use a fairly complicated syntax, so they're identified with a regular expression. All other upstream inline syntaxes are parsed character by character, moving upstream from the caret position.
- Inheritance
-
- Object
- EditReaction
- MarkdownInlineUpstreamSyntaxReaction
Constructors
-
MarkdownInlineUpstreamSyntaxReaction(List<
UpstreamMarkdownInlineSyntax> _parsers) -
const
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
modifyContent(
EditContext editorContext, RequestDispatcher requestDispatcher, List< EditEvent> changeList) → void -
Executes additional
modificationswithin the current editor transaction.inherited -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
react(
EditContext editContext, RequestDispatcher requestDispatcher, List< EditEvent> changeList) → void -
Executes additional
actionsin a new standalone transaction.override -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited