pub struct Warning {
pub fidelity: Fidelity,
pub path: String,
pub kind: Kind,
}Expand description
Whether a generic container was written as a TAG or as a DIRECTIVE — the
axis DirectiveForm is repeatedly mistaken for and cannot answer.
DirectiveForm is a spelling hint: which of a directive-capable format’s
three spellings fits this node. Twig’s HTML parser sets one on <div> and
<span> because those are the two tags djot and Markdown have generic
spellings for — so a <div> and a Markdown :::div produce nodes that
agree on kind, name and form alike. Until this axis existed, the only way
to separate them was to re-read the source bytes under the node’s span and
look at the first character.
Read-only: it records what a parser saw, and there is nothing to set on the
build path.
One thing a conversion would silently lose. See Document::diagnostics.
Fields§
§fidelity: Fidelity§path: StringA slash-separated child-index trail from the document root ("1/0/2"),
EMPTY for the root itself.
A path and not a byte span, because the output being described does not exist yet — there is nothing in it to point at. Resolve it against the tree you already have.
kind: KindThe affected node’s kind, with family members reported as themselves
(Kind::Superscript, not an inline_mark).