Source: https://github.com/syntax-tree/mdast/blob/main/_autodocs/api-reference/nodes-phrasing.md
Shows the JavaScript object representation of an Html node for the markdown input `
`. The value field contains the raw HTML fragment.
```js
{type: 'html', value: '
'}
```
--------------------------------
### Paragraph markdown example
Source: https://github.com/syntax-tree/mdast/blob/main/readme.md
Markdown source for a paragraph with the text 'Alpha bravo charlie.'
```markdown
Alpha bravo charlie.
```
--------------------------------
### LinkReference example: markdown [alpha][Bravo] yields node
Source: https://github.com/syntax-tree/mdast/blob/main/_autodocs/api-reference/nodes-phrasing.md
Shows the JavaScript object representation of the LinkReference node for the markdown `[alpha][Bravo]`.
```js
{
type: 'linkReference',
identifier: 'bravo',
label: 'Bravo',
referenceType: 'full',
children: [{type: 'text', value: 'alpha'}]
}
```
--------------------------------
### Example literal node (JavaScript object)
Source: https://github.com/syntax-tree/mdast/blob/main/_autodocs/api-reference/abstract-nodes.md
Shows a literal node as produced by a compliant parser, with type 'text' and a string value.
```js
{type: 'text', value: 'Alpha bravo charlie.'}
```
--------------------------------
### InlineCode example: markdown `foo()` yields node
Source: https://github.com/syntax-tree/mdast/blob/main/_autodocs/api-reference/nodes-phrasing.md
Shows the JavaScript object representation of the InlineCode node for the markdown `` `foo()` ``.
```js
{type: 'inlineCode', value: 'foo()'}
```
--------------------------------
### Table markdown example and resulting AST
Source: https://github.com/syntax-tree/mdast/blob/main/_autodocs/api-reference/nodes-gfm.md
Shows a markdown table and the corresponding mdast Table node it yields. The align field is ['left', 'center'] based on the column alignment markers.
```markdown
| foo | bar |
| :-- | :-: |
| baz | qux |
```
```js
{
type: 'table',
align: ['left', 'center'],
children: [
{
type: 'tableRow',
children: [
{
type: 'tableCell',
children: [{type: 'text', value: 'foo'}]
},
{
type: 'tableCell',
children: [{type: 'text', value: 'bar'}]
}
]
},
{
type: 'tableRow',
children: [
{
type: 'tableCell',
children: [{type: 'text', value: 'baz'}]
},
{
type: 'tableCell',
children: [{type: 'text', value: 'qux'}]
}
]
}
]
}
```
--------------------------------
### TypeScript Object Literal for Yaml Node
Source: https://github.com/syntax-tree/mdast/blob/main/_autodocs/api-reference/nodes-frontmatter.md
TypeScript example showing how to create a `Yaml` node with the `Yaml` type from `mdast`. The `value` field holds the raw YAML body.
```ts
import type {Yaml} from 'mdast' // @types/mdast
const metadata: Yaml = {
type: 'yaml',
value: 'foo: bar'
}
```
--------------------------------
### Delete markdown example and JavaScript AST output
Source: https://github.com/syntax-tree/mdast/blob/main/readme.md
Shows the markdown for a delete (strikethrough) and the resulting JavaScript AST node. The markdown '~~alpha~~' yields a delete node with a text child 'alpha'.
```markdown
~~alpha~~
```
```js
{
type: 'delete',
children: [{type: 'text', value: 'alpha'}]
}
```
--------------------------------
### Markdown example of a thematic break
Source: https://github.com/syntax-tree/mdast/blob/main/readme.md
Shows the markdown syntax for a thematic break, which is three asterisks on a line. This is the input that yields the ThematicBreak node.
```markdown
***
```
--------------------------------
### Image node example from markdown image with title
Source: https://github.com/syntax-tree/mdast/blob/main/_autodocs/api-reference/nodes-phrasing.md
Shows the JavaScript object representation of an Image node for the markdown input ``. The url, title, and alt fields are populated from the markdown.
```js
{
type: 'image',
url: 'https://example.com/favicon.ico',
title: 'bravo',
alt: 'alpha'
}
```
--------------------------------
### FootnoteReference markdown example and JavaScript AST output
Source: https://github.com/syntax-tree/mdast/blob/main/readme.md
Shows the markdown for a footnote reference and the resulting JavaScript AST node. The markdown '[^alpha]' yields a footnoteReference node with identifier and label 'alpha'.
```markdown
[^alpha]
```
```js
{
type: 'footnoteReference',
identifier: 'alpha',
label: 'alpha'
}
```
--------------------------------
### ImageReference node example from markdown reference image
Source: https://github.com/syntax-tree/mdast/blob/main/_autodocs/api-reference/nodes-phrasing.md
Shows the JavaScript object representation of an ImageReference node for the markdown input `![alpha][bravo]`. The identifier, label, referenceType, and alt fields are populated from the markdown.
```js
{
type: 'imageReference',
identifier: 'bravo',
label: 'bravo',
referenceType: 'full',
alt: 'alpha'
}
```
--------------------------------
### Break yields JavaScript AST
Source: https://github.com/syntax-tree/mdast/blob/main/readme.md
The JavaScript object representation of the break example. It shows the resulting AST with a break node between two text nodes.
```js
{
type: 'paragraph',
children: [
{type: 'text', value: 'foo'},
{type: 'break'},
{type: 'text', value: 'bar'}
]
}
```
--------------------------------
### ListItem node example: markdown `* bar` yields AST (JavaScript)
Source: https://github.com/syntax-tree/mdast/blob/main/_autodocs/api-reference/nodes-flow.md
Shows the JavaScript object representation of a `ListItem` node produced from the markdown `* bar`. The `spread` field is `false`, and the `children` array contains a single paragraph with a text node with value `'bar'`.
```javascript
{
type: 'listItem',
spread: false,
children: [{
type: 'paragraph',
children: [{type: 'text', value: 'bar'}]
}]
}
```
--------------------------------
### JavaScript Object Representation of Yaml Node
Source: https://github.com/syntax-tree/mdast/blob/main/_autodocs/api-reference/nodes-frontmatter.md
Represents the `Yaml` node as a plain JavaScript object with `type: 'yaml'` and `value: 'foo: bar'`. This is the output of parsing the markdown example.
```js
{type: 'yaml', value: 'foo: bar'}
```
--------------------------------
### List node interface definition (IDL)
Source: https://github.com/syntax-tree/mdast/blob/main/_autodocs/api-reference/nodes-flow.md
Defines the `List` node as a Parent with a `type` of `'list'`. Its fields include optional `ordered`, `start`, and `spread`, and a required `children` array of `ListContent` nodes. The `type` field is the node discriminator.
```idl
interface List <: Parent {
type: 'list'
ordered: boolean?
start: number?
spread: boolean?
children: [ListContent]
}
```
--------------------------------
### package.json: Full contents
Source: https://github.com/syntax-tree/mdast/blob/main/_autodocs/configuration.md
The complete package.json for the mdast repository. It is private (never published to npm) and includes dev dependencies for remark-cli and remark-preset-wooorm, with scripts for formatting and testing. The remarkConfig uses the remark-preset-wooorm plugin.
```json
{
"author": "Titus Wormer (wooorm.com)",
"bugs": "https://github.com/syntax-tree/mdast/issues",
"contributors": [
"Titus Wormer (wooorm.com)",
"Eugene Sharygin "
],
"description": "markdown abstract syntax tree",
"devDependencies": {
"remark-cli": "^12.0.0",
"remark-preset-wooorm": "^10.0.0"
},
"keywords": [],
"license": "MIT",
"private": true,
"remarkConfig": {
"plugins": [
"remark-preset-wooorm"
]
},
"repository": "syntax-tree/mdast",
"scripts": {
"format": "remark --frail --output --quiet -- .",
"test": "npm run format"
},
"version": "0.0.0"
}
```
--------------------------------
### Resource mixin (url and title fields)
Source: https://github.com/syntax-tree/mdast/blob/main/_autodocs/types.md
Defines the Resource mixin, which contributes a required url field and an optional title field. The title represents advisory information such as a tooltip.
```idl
interface mixin Resource {
url: string
title: string?
}
```
--------------------------------
### Image interface definition
Source: https://github.com/syntax-tree/mdast/blob/main/_autodocs/api-reference/nodes-phrasing.md
Defines the Image node as a subtype of Node with type 'image'. Includes the Resource and Alternative mixins, providing url, title, and alt fields.
```idl
interface Image <: Node {
type: 'image'
}
Image includes Resource
Image includes Alternative
```
--------------------------------
### ListContentGfm type alias
Source: https://github.com/syntax-tree/mdast/blob/main/_autodocs/types.md
GFM list content: task-list-capable items.
```idl
type ListContentGfm = ListItemGfm
```
--------------------------------
### Content type alias
Source: https://github.com/syntax-tree/mdast/blob/main/_autodocs/types.md
Runs of text that form definitions and paragraphs. Used by FlowContent.
```idl
type Content = Definition | Paragraph
```
--------------------------------
### Reference mixin (referenceType field, includes Association)
Source: https://github.com/syntax-tree/mdast/blob/main/_autodocs/types.md
Defines the Reference mixin, which includes Association and adds a required referenceType field. The referenceType must be one of 'shortcut', 'collapsed', or 'full'.
```idl
interface mixin Reference {
referenceType: string
}
Reference includes Association
```
--------------------------------
### FlowContentFrontmatter type alias
Source: https://github.com/syntax-tree/mdast/blob/main/_autodocs/types.md
Flow content extended with frontmatter.
```idl
type FlowContentFrontmatter = FrontmatterContent | FlowContent
```
--------------------------------
### Parent interface definition (Web IDL)
Source: https://github.com/syntax-tree/mdast/blob/main/_autodocs/api-reference/abstract-nodes.md
Defines the abstract Parent interface in Web IDL, inheriting from UnistParent and adding a required array field 'children' of type MdastContent.
```idl
interface Parent <: UnistParent {
children: [MdastContent]
}
```
--------------------------------
### Alternative mixin (alt field)
Source: https://github.com/syntax-tree/mdast/blob/main/_autodocs/types.md
Defines the Alternative mixin, which contributes an optional alt field to nodes like Image and ImageReference. The alt field represents fallback content for environments that cannot render the node as intended.
```idl
interface mixin Alternative {
alt: string?
}
```
--------------------------------
### PhrasingContentGfm type alias
Source: https://github.com/syntax-tree/mdast/blob/main/_autodocs/types.md
GFM phrasing content: base phrasing content plus footnotes and strikethrough.
```idl
type PhrasingContentGfm = FootnoteReference | Delete | PhrasingContent
```
--------------------------------
### Association mixin (identifier and label fields)
Source: https://github.com/syntax-tree/mdast/blob/main/_autodocs/types.md
Defines the Association mixin, which contributes an identifier field (required, normalized source value) and an optional label field (parsed value). The identifier must be normalized by collapsing whitespace, trimming, and case-folding.
```idl
interface mixin Association {
identifier: string
label: string?
}
```
--------------------------------
### Heading node interface
Source: https://github.com/syntax-tree/mdast/blob/main/_autodocs/api-reference/nodes-flow.md
Defines the Heading node type in the mdast syntax tree. It extends Parent and includes a depth field (1-6) and children of phrasing content.
```idl
interface Heading <: Parent {
type: 'heading'
depth: 1 <= number <= 6
children: [PhrasingContent]
}
```
--------------------------------
### Strong node interface
Source: https://github.com/syntax-tree/mdast/blob/main/_autodocs/api-reference/nodes-phrasing.md
Defines the Strong node interface in the mdast syntax tree. It extends Parent and requires a 'strong' type and children of PhrasingContent.
```idl
interface Strong <: Parent {
type: 'strong'
children: [PhrasingContent]
}
```
--------------------------------
### Link interface definition
Source: https://github.com/syntax-tree/mdast/blob/main/_autodocs/api-reference/nodes-phrasing.md
Defines the Link node as a Parent with type 'link' and children of PhrasingContent. Includes the Resource mixin for url and title fields.
```idl
interface Link <: Parent {
type: 'link'
children: [PhrasingContent]
}
Link includes Resource
```
--------------------------------
### ListItemGfm interface definition (IDL)
Source: https://github.com/syntax-tree/mdast/blob/main/_autodocs/api-reference/nodes-gfm.md
Defines the ListItemGfm node as a refinement of ListItem, adding an optional checked field for task-list state. The checked field can be true, false, or null/absent for indeterminate.
```idl
interface ListItemGfm <: ListItem {
checked: boolean?
}
```
--------------------------------
### Text node interface
Source: https://github.com/syntax-tree/mdast/blob/main/_autodocs/api-reference/nodes-phrasing.md
Defines the Text node interface in the mdast syntax tree. It extends Literal and has a 'text' type.
```idl
interface Text <: Literal {
type: 'text'
}
```
--------------------------------
### ImageReference interface definition
Source: https://github.com/syntax-tree/mdast/blob/main/_autodocs/api-reference/nodes-phrasing.md
Defines the ImageReference node as a subtype of Node with type 'imageReference'. Includes the Reference and Alternative mixins, providing identifier, label, referenceType, and alt fields.
```idl
interface ImageReference <: Node {
type: 'imageReference'
}
ImageReference includes Reference
ImageReference includes Alternative
```
--------------------------------
### Root interface definition
Source: https://github.com/syntax-tree/mdast/blob/main/_autodocs/api-reference/nodes-flow.md
Defines the Root node interface in the mdast specification. It extends Parent and requires a type field set to 'root'. Inherits children from Parent.
```idl
interface Root <: Parent {
type: 'root'
}
```
--------------------------------
### FlowContentGfm type alias
Source: https://github.com/syntax-tree/mdast/blob/main/_autodocs/types.md
GFM flow content: base flow content plus footnotes and tables.
```idl
type FlowContentGfm = FootnoteDefinition | Table | FlowContent
```
--------------------------------
### Html interface definition
Source: https://github.com/syntax-tree/mdast/blob/main/_autodocs/api-reference/nodes-phrasing.md
Defines the Html node as a subtype of Literal with type 'html'. Represents a fragment of raw HTML usable where flow or phrasing content is expected.
```idl
interface Html <: Literal {
type: 'html'
}
```
--------------------------------
### Definition node interface
Source: https://github.com/syntax-tree/mdast/blob/main/_autodocs/api-reference/nodes-flow.md
Defines the Definition node type in the mdast syntax tree. It includes the Association and Resource mixins, providing fields for identifier, label, url, and title.
```idl
interface Definition <: Node {
type: 'definition'
}
Definition includes Association
Definition includes Resource
```
--------------------------------
### FrontmatterContent type alias
Source: https://github.com/syntax-tree/mdast/blob/main/_autodocs/types.md
Out-of-band information about the document. Constraints: if frontmatter is present, it must be limited to one node in the tree, and can only exist as a head.
```idl
type FrontmatterContent = Yaml
```
--------------------------------
### Break interface (IDL)
Source: https://github.com/syntax-tree/mdast/blob/main/readme.md
Defines the Break node interface, which has a type of 'break'. It extends Node.
```idl
interface Break <: Node {
type: 'break'
}
```
--------------------------------
### ListContent type alias
Source: https://github.com/syntax-tree/mdast/blob/main/_autodocs/types.md
The items in a list. Used by List.children; part of MdastContent.
```idl
type ListContent = ListItem
```
--------------------------------
### Emphasis interface definition (IDL)
Source: https://github.com/syntax-tree/mdast/blob/main/readme.md
Defines the 'Emphasis' node interface in IDL, which extends Parent and has a type field of 'emphasis' and children of PhrasingContent. Use this to understand the structure of emphasis nodes in the mdast syntax tree.
```idl
interface Emphasis <: Parent {
type: 'emphasis'
children: [PhrasingContent]
}
```
--------------------------------
### Code interface definition
Source: https://github.com/syntax-tree/mdast/blob/main/_autodocs/api-reference/nodes-flow.md
Defines the Code node interface with type 'code', optional lang and meta fields, and inherits value from Literal.
```idl
interface Code <: Literal {
type: 'code'
lang: string?
meta: string?
}
```
--------------------------------
### Emphasis AST output (JavaScript)
Source: https://github.com/syntax-tree/mdast/blob/main/readme.md
The JavaScript object representation of the emphasis node for the markdown '*alpha* _bravo_'. It shows a paragraph containing two emphasis nodes and a text node for the space.
```js
{
type: 'paragraph',
children: [
{
type: 'emphasis',
children: [{type: 'text', value: 'alpha'}]
},
{type: 'text', value: ' '},
{
type: 'emphasis',
children: [{type: 'text', value: 'bravo'}]
}
]
}
```
--------------------------------
### Paragraph interface definition
Source: https://github.com/syntax-tree/mdast/blob/main/_autodocs/api-reference/nodes-flow.md
Defines the Paragraph node interface in the mdast specification. It extends Parent and requires a type field set to 'paragraph' and a children array of PhrasingContent.
```idl
interface Paragraph <: Parent {
type: 'paragraph'
children: [PhrasingContent]
}
```
--------------------------------
### MdastContent type alias
Source: https://github.com/syntax-tree/mdast/blob/main/_autodocs/types.md
The union of all node categories. Used by Parent.children as the abstract container contract for every parent node.
```idl
type MdastContent = FlowContent | ListContent | PhrasingContent
```
--------------------------------
### ListItem node interface definition (IDL)
Source: https://github.com/syntax-tree/mdast/blob/main/_autodocs/api-reference/nodes-flow.md
Defines the `ListItem` node as a Parent with a `type` of `'listItem'`. It has an optional `spread` field and a required `children` array of `FlowContent`. The `type` field is the node discriminator.
```idl
interface ListItem <: Parent {
type: 'listItem'
spread: boolean?
children: [FlowContent]
}
```
--------------------------------
### InlineCode interface definition
Source: https://github.com/syntax-tree/mdast/blob/main/_autodocs/api-reference/nodes-phrasing.md
Defines the InlineCode node as a Literal with type 'inlineCode'. Used to represent a fragment of computer code in phrasing content.
```idl
interface InlineCode <: Literal {
type: 'inlineCode'
}
```
--------------------------------
### FootnoteReference interface (IDL)
Source: https://github.com/syntax-tree/mdast/blob/main/_autodocs/api-reference/nodes-gfm.md
Defines the FootnoteReference node type, which extends Node and includes the Association mixin. It represents a marker through association, usable where phrasing content is expected.
```idl
interface FootnoteReference <: Node {
type: 'footnoteReference'
}
FootnoteReference includes Association
```
--------------------------------
### Table node interface
Source: https://github.com/syntax-tree/mdast/blob/main/_autodocs/api-reference/nodes-gfm.md
Defines the Table node interface in the mdast syntax tree. It has a type field set to 'table', an optional align field that is a list of alignType values, and a children field containing TableContent nodes.
```idl
interface Table <: Parent {
type: 'table'
align: [alignType]?
children: [TableContent]
}
```
--------------------------------
### Literal interface definition (Web IDL)
Source: https://github.com/syntax-tree/mdast/blob/main/_autodocs/api-reference/abstract-nodes.md
Defines the abstract Literal interface in Web IDL, inheriting from UnistLiteral and adding a required string field 'value'. This is the normative definition for implementations.
```idl
interface Literal <: UnistLiteral {
value: string
}
```
--------------------------------
### Yaml Interface Definition (IDL)
Source: https://github.com/syntax-tree/mdast/blob/main/_autodocs/api-reference/nodes-frontmatter.md
Defines the `Yaml` interface as a subtype of `Literal` with a `type` field set to `'yaml'`. This is the normative interface for the node.
```idl
interface Yaml <: Literal {
type: 'yaml'
}
```
--------------------------------
### LinkReference interface definition
Source: https://github.com/syntax-tree/mdast/blob/main/_autodocs/api-reference/nodes-phrasing.md
Defines the LinkReference node as a Parent with type 'linkReference' and children of PhrasingContent. Includes the Reference mixin for identifier, label, and referenceType fields.
```idl
interface LinkReference <: Parent {
type: 'linkReference'
children: [PhrasingContent]
}
LinkReference includes Reference
```
--------------------------------
### ThematicBreak interface definition
Source: https://github.com/syntax-tree/mdast/blob/main/_autodocs/api-reference/nodes-flow.md
Defines the ThematicBreak node interface in the mdast specification. It extends Node and requires a type field set to 'thematicBreak'. It has no content model.
```idl
interface ThematicBreak <: Node {
type: 'thematicBreak'
}
```
--------------------------------
### referenceType enum
Source: https://github.com/syntax-tree/mdast/blob/main/_autodocs/types.md
Defines the explicitness of a reference. Values: 'shortcut' (implicit identifier inferred from content), 'collapsed' (explicit identifier inferred from content), 'full' (explicit identifier explicitly set). Used by the Reference mixin's referenceType field, and therefore by LinkReference and ImageReference.
```idl
enum referenceType {
'shortcut' | 'collapsed' | 'full'
}
```
--------------------------------
### Delete interface definition (IDL)
Source: https://github.com/syntax-tree/mdast/blob/main/_autodocs/api-reference/nodes-gfm.md
Defines the Delete node as a Parent with type 'delete' and children of PhrasingContent. Represents strikethrough content that is no longer accurate or relevant.
```idl
interface Delete <: Parent {
type: 'delete'
children: [PhrasingContent]
}
```
--------------------------------
### Blockquote interface definition
Source: https://github.com/syntax-tree/mdast/blob/main/_autodocs/api-reference/nodes-flow.md
Defines the Blockquote node interface with type 'blockquote' and children of FlowContent. Inherits from Parent.
```idl
interface Blockquote <: Parent {
type: 'blockquote'
children: [FlowContent]
}
```
--------------------------------
### TableRow interface definition
Source: https://github.com/syntax-tree/mdast/blob/main/_autodocs/api-reference/nodes-gfm.md
Defines the TableRow node type in the mdast syntax tree. It represents a row of cells in a table and is usable where table content is expected. Its content model is row content, and if the node is a head, it represents the column labels for its parent Table.
```idl
interface TableRow <: Parent {
type: 'tableRow'
children: [RowContent]
}
```
--------------------------------
### PhrasingContent type alias
Source: https://github.com/syntax-tree/mdast/blob/main/_autodocs/types.md
The text in a document and its markup. Used by Emphasis.children, Heading.children, Link.children, LinkReference.children, Paragraph.children, Strong.children, Delete.children, TableCell.children; part of MdastContent.
```idl
type PhrasingContent = Break | Emphasis | Html | Image | ImageReference
| InlineCode | Link | LinkReference | Strong | Text
```
--------------------------------
### alignType enum
Source: https://github.com/syntax-tree/mdast/blob/main/_autodocs/types.md
Represents how phrasing content is aligned per CSS Text. Values: 'left', 'right', 'center' correspond to text-align CSS property values; null means aligned as defined by the host environment. Used by Table's align field ([alignType]?).
```idl
enum alignType {
'left' | 'right' | 'center' | null
}
```
--------------------------------
### FootnoteDefinition interface (IDL)
Source: https://github.com/syntax-tree/mdast/blob/main/_autodocs/api-reference/nodes-gfm.md
Defines the FootnoteDefinition node type, which extends Parent and includes the Association mixin. It represents content relating to the document that is outside its flow, usable where flow content is expected.
```idl
interface FootnoteDefinition <: Parent {
type: 'footnoteDefinition'
children: [FlowContent]
}
FootnoteDefinition includes Association
```
--------------------------------
### FlowContent type alias
Source: https://github.com/syntax-tree/mdast/blob/main/_autodocs/types.md
The sections of a document. Used by Blockquote.children, ListItem.children, FootnoteDefinition.children; part of MdastContent.
```idl
type FlowContent =
Blockquote | Code | Heading | Html | List | ThematicBreak | Content
```
--------------------------------
### TableContent type alias
Source: https://github.com/syntax-tree/mdast/blob/main/_autodocs/types.md
The rows in a table. Used by Table.children.
```idl
type TableContent = TableRow
```
--------------------------------
### TableCell node interface
Source: https://github.com/syntax-tree/mdast/blob/main/_autodocs/api-reference/nodes-gfm.md
Defines the TableCell node interface in the mdast syntax tree. It has a type field set to 'tableCell' and a children field containing PhrasingContent nodes, excluding Break nodes.
```idl
interface TableCell <: Parent {
type: 'tableCell'
children: [PhrasingContent]
}
```
--------------------------------
### RowContent type alias
Source: https://github.com/syntax-tree/mdast/blob/main/_autodocs/types.md
The cells in a row. Used by TableRow.children.
```idl
type RowContent = TableCell
```
=== COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.