https://ns.adobe.com/helix/pipeline/mdast
The Markdown AST is 100% API compatible with the UnifiedJS MDAST data structure.
All MDAST Utilities are compatible and can be used for easy processing of MDAST trees.
Abstract | Extensible | Status | Identifiable | Custom Properties | Additional Properties | Access Restrictions | Defined In |
---|---|---|---|---|---|---|---|
Can be instantiated | No | Stable | No | Forbidden | Forbidden | none | mdast.schema.json |
object
(MDAST)
Property | Type | Required | Nullable | Defined by |
---|---|---|---|---|
type | Not specified | Optional | cannot be null | MDAST |
children | array |
Optional | cannot be null | MDAST |
position | object |
Optional | cannot be null | MDAST |
value | string |
Optional | cannot be null | MDAST |
payload | object |
Optional | cannot be null | MDAST |
depth | integer |
Optional | cannot be null | MDAST |
ordered | boolean |
Optional | cannot be null | MDAST |
start | integer |
Optional | can be null | MDAST |
spread | boolean |
Optional | can be null | MDAST |
checked | boolean |
Optional | can be null | MDAST |
align | array |
Optional | cannot be null | MDAST |
lang | string |
Optional | can be null | MDAST |
identifier | string |
Optional | cannot be null | MDAST |
label | string |
Optional | cannot be null | MDAST |
url | string |
Optional | cannot be null | MDAST |
meta | object |
Optional | can be null | MDAST |
title | string |
Optional | can be null | MDAST |
code | string |
Optional | cannot be null | MDAST |
intro | string |
Optional | can be null | MDAST |
image | string |
Optional | can be null | MDAST |
types | array |
Optional | cannot be null | MDAST |
alt | string |
Optional | can be null | MDAST |
referenceType | Not specified | Optional | cannot be null | MDAST |
data | object |
Optional | cannot be null | MDAST |
The node type of the MDAST node
type
-
is optional
-
Type: unknown
-
cannot be null
-
defined in: MDAST
unknown
enum: the value of this property must be equal to one of the following values:
Value | Explanation |
---|---|
"root" |
The root node, representing a document or section |
"paragraph" |
A paragraph. Note: standalone `image` blocks are often wrapped in a `paragraph` |
"text" |
Plain text |
"heading" |
A heading with heading level |
"thematicBreak" |
A section break |
"blockquote" |
A blockquote |
"list" |
An ordered or unordered list |
"listItem" |
|
"table" |
A table |
"tableRow" |
A row in a table |
"tableCell" |
A cell in a table |
"html" |
Raw HTML embedded in Markdown. Disabled by default. |
"code" |
A code block |
"yaml" |
A metadata block. If the block is not at the top of the document, it will start a new section. |
"definition" |
A definition that can be referenced |
"footnoteDefinition" |
A footnote |
"emphasis" |
emphasis (often in italics) |
"strong" |
strong (often in bold type) |
"delete" |
deleted content |
"inlineCode" |
inline code |
"break" |
A line break |
"link" |
A hyperlink |
"image" |
An image |
"linkReference" |
A pointer to a link |
"imageReference" |
A pointer to an image |
"footnote" |
A footnote |
"footnoteReference" |
A reference to a footnote |
"embed" |
Content embedded from another page, identified by the `url` attribute. |
"dataEmbed" |
Data embedded from another data source (API), identified by the `url` attribute. |
"section" |
A section within the document. Sections serve as a high-level structure of a single markdown document and can have their own section-specific front matter metadata. |
"icon" |
An SVG icon, identified by the syntax `:foo:` |
children
an array of merged types (Details)
Marks the position of an AST node in the original text flow
position
object
(Position)
The string value of the node, if it is a terminal node.
value
-
is optional
-
Type:
string
-
cannot be null
-
defined in: MDAST
string
The payload of a frontmatter/yaml block
payload
object
(Details)
The heading level
depth
-
is optional
-
Type:
integer
-
cannot be null
-
defined in: MDAST
integer
maximum: the value of this number must smaller than or equal to: 6
minimum: the value of this number must greater than or equal to: 1
Is the list ordered
ordered
-
is optional
-
Type:
boolean
-
cannot be null
-
defined in: MDAST
boolean
Starting item of the list
start
-
is optional
-
Type:
integer
-
can be null
-
defined in: MDAST
integer
A spread field can be present. It represents that any of its items is separated by a blank line from its siblings or contains two or more children (when true), or not (when false or not present).
spread
-
is optional
-
Type:
boolean
-
can be null
-
defined in: MDAST
boolean
A checked field can be present. It represents whether the item is done (when true), not done (when false), or indeterminate or not applicable (when null or not present).
checked
-
is optional
-
Type:
boolean
-
can be null
-
defined in: MDAST
boolean
For tables, an align field can be present. If present, it must be a list of alignTypes. It represents how cells in columns are aligned.
align
-
is optional
-
Type:
string[]
-
cannot be null
-
defined in: MDAST
string[]
For code, a lang field can be present. It represents the language of computer code being marked up.
lang
-
is optional
-
Type:
string
-
can be null
-
defined in: MDAST
string
For associations, an identifier field must be present. It can match an identifier field on another node.
identifier
-
is optional
-
Type:
string
-
cannot be null
-
defined in: MDAST
string
For associations, a label field can be present. It represents the original value of the normalised identifier field.
label
-
is optional
-
Type:
string
-
cannot be null
-
defined in: MDAST
string
For resources, an url field must be present. It represents a URL to the referenced resource.
url
-
is optional
-
Type:
string
-
cannot be null
-
defined in: MDAST
string
URI reference: the string must be a URI reference, according to RFC 3986
meta
object
(Details)
Extracted title of the document
title
-
is optional
-
Type:
string
-
can be null
-
defined in: MDAST
string
Icon code
code
-
is optional
-
Type:
string
-
cannot be null
-
defined in: MDAST
string
pattern: the string must match the following regular expression:
:#*[a-zA-Z_-]+[a-zA-Z0-9]*:
Extracted first paragraph of the document
intro
-
is optional
-
Type:
string
-
can be null
-
defined in: MDAST
string
Path (can be relative) to the first image in the document
image
-
is optional
-
Type:
string
-
can be null
-
defined in: MDAST
string
URI reference: the string must be a URI reference, according to RFC 3986
The inferred class names for the section
types
-
is optional
-
Type:
string[]
-
cannot be null
-
defined in: MDAST
string[]
An alt field should be present. It represents equivalent content for environments that cannot represent the node as intended.
alt
-
is optional
-
Type:
string
-
can be null
-
defined in: MDAST
string
Represents the explicitness of a reference.
referenceType
-
is optional
-
Type: unknown
-
cannot be null
-
defined in: MDAST
unknown
enum: the value of this property must be equal to one of the following values:
Value | Explanation |
---|---|
"shortcut" |
the reference is implicit, its identifier inferred from its content |
"collapsed" |
the reference is explicit, its identifier inferred from its content |
"full" |
the reference is explicit, its identifier explicitly set |
data is guaranteed to never be specified by unist or specifications implementing unist. Free data space.
data
object
(Details)