SpecMarkdownRejection class
One rejected block in a Markdown import (SOM §11.7). Reported, never silently dropped: each carries the source line, the offending anchor (section path or id), the reason, and a human-readable message.
Constructors
- SpecMarkdownRejection({required int line, required SpecMarkdownRejectReason reason, required String message, String? anchor})
-
Reports one rejected block.
anchoris optional because the earliest failure — text sitting before any root heading — has nothing to point at; every other rejection site fills it with the offending section id or the resolved document path.
Properties
- anchor → String?
-
What the rejection points at: the section id for an unresolvable or
kind-mismatched heading, the resolved document path for a value section
left empty, the raw heading text when no
<!--[ID]-->comment could be read at all. Null only for orphan content, which has neither id nor path.final - hashCode → int
-
The hash code for this object.
no setterinherited
- line → int
-
1-based source line of the offending heading (or of the orphaned text),
counted over the imported text split on
\n. This is the coordinate an editor jumps to, so it is the heading's own line even when the fault is only detected when the section closes (a value leaf with no body).final - message → String
-
One display-ready sentence naming what was wrong, sometimes carrying
context the reason cannot (the list of known root ids, the parent path a
section failed to resolve under). Not a stable identifier — the wording
is free to change.
final
- reason → SpecMarkdownRejectReason
-
The rejection class, for callers that group, count or filter the report
rather than printing it; the human sentence is message. Switch on this,
never on the message text.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited