Expand description
Structs§
- Alert
- A GFM alert / admonition. Source:
> [!NOTE]followed by quoted content. - Autolink
- An autolink:
<https://example.com>,<a@b.c>, or a GFM literal autolink, a barehttps://…,www.…, or email address. The text as written is the node’s one fact;Autolink::destinationderives the link target from it. - Blank
Line - A blank line the source holds beyond the one that separates two blocks:
K blank lines between two blocks are one separator and K − 1 of these.
Before a document’s first block, at the start or end of a block quote,
alert, HTML container, or container directive, and after a document’s
last line, each blank line is one. Source: a line holding only
whitespace and its containers’
>markers. - Block
Quote - A block quote: content prefixed with
>. - Character
Reference - A character reference such as
&or÷. The reference as written is the node’s one fact;CharacterReference::valuedecodes it. - Code
Block - A code block. Source:
```lang … ```(fenced) or 4-space-indented lines. - Code
Inline - An inline code span:
`code`. The fence and the padding spaces are not recorded: the serializer chooses them from the value. - Container
Directive - A container directive. Source:
:::name[label]{attrs}…:::. - Definition
- A link reference definition. Source:
[label]: destination "title". - Delete
- Strikethrough:
~~text~~. - Directive
Attribute - One attribute of a directive’s
{name=value}block. - Document
- The root of a document: a sequence of top-level
Blocks, and for a parsed document the source it was parsed from. - Emphasis
- Emphasis (typically italic):
*text*or_text_. - Escape
- A backslash escape such as
\*or\\. - Footnote
Definition - A footnote definition. Source:
[^id]: footnote text. - Footnote
Reference - A footnote reference:
[^id]. - Frontmatter
- A leading frontmatter block. Source:
---YAML or+++TOML at the top of the document. - Heading
- A heading. Source:
# Title…###### Title(ATX). - Html
Block - A raw HTML block: HTML emitted verbatim.
- Html
Container - A structured raw HTML container, such as
<details> ... </details>. - Html
Inline - Raw inline HTML such as
<span>or</em>. - HtmlTag
- A raw HTML tag that bounds an
HtmlContainer. - Image
- An inline image:
. - Image
Reference - A reference image:
![alt][label],![alt][], or![alt]. - Inline
Footnote - An inline footnote:
^[inline note]. - Leaf
Directive - A leaf directive. Source:
::name[label]{attrs}. - Line
Break - A hard line break: a trailing
\or two trailing spaces. - Link
- An inline link:
[text](destination "title"). - Link
Reference - A reference link:
[text][label],[text][], or[text]. - List
- A bullet or ordered list. Source:
- a/1. alines. - List
Item - A single list item, optionally a GFM task-list checkbox.
- Mark
- A highlight / “mark” span:
==text==. - Math
Block - A display math block. Source:
$$ … $$. - Math
Inline - Inline math:
$x$. - Node
Meta - Metadata attached to every AST node; currently just the source span.
- Node
Path - Child indices from a document down to one node. A list’s children are its items, a table’s are its rows, and a row’s are its cells; every other container’s are its blocks.
- Paragraph
- A paragraph: a run of inline content. Source: any plain text line(s).
- Shortcode
- An emoji shortcode:
:name:, wherenameis a gemoji name or alias. - Soft
Break - A soft line break: a plain newline within a paragraph.
- Strong
- Strong emphasis (typically bold):
**text**or__text__. - Table
- A GFM pipe table: a header row, an alignment row, then body rows. Source:
| a | b |/|---|---|/| 1 | 2 |. - Table
Cell - A single cell of a
TableRow. - Table
Row - A single row of a
Table. - Tag
- A tag:
#and a name, such as#rustor#ai/agents. - Text
- Literal text content.
- Text
Directive - A text directive. Source:
:name[label]{attrs}. - Thematic
Break - A thematic break / horizontal rule. Source:
---,***, or___. - Title
- The title of a
Link,Image, orDefinition: its text and the quotes it is written in. - Wiki
Link - A wiki link:
[[target|label]], or an embed:![[target|label]].
Enums§
- Alert
Kind - The kind of a GFM
Alert(the[!KIND]marker). - Autolink
Form - How an
Autolinkis written. - Block
- A block-level node: the building blocks of a document’s vertical structure.
- Code
Block Kind - Whether a
CodeBlockis fenced or indented. - Emphasis
Delimiter - The delimiter character of an
EmphasisorStrongspan. - Fence
Marker - The character used to fence a
CodeBlock. - Frontmatter
Kind - The format of a
Frontmatterblock. - Html
Container Content - The parsed content inside an
HtmlContainer. - Inline
- An inline-level node: the leaf and span content inside blocks.
- Line
Break Kind - Which syntax produced a hard
LineBreak. - Link
Destination Kind - How a link/image destination was delimited in the source.
- Link
Title Kind - How a link/image title was quoted in the source.
- List
Delimiter - The marker character that delimits a list’s items.
- Math
Inline Kind - Which syntax delimited an inline
MathInlinespan. - Reference
Kind - The form of a reference link/image.
- Table
Alignment - The alignment of a
Tablecolumn, from the:---:delimiter row. - Thematic
Break Marker - The character used to draw a
ThematicBreak.