6464 * @param {Root } tree
6565 * Tree to transform.
6666 * @returns {Root | undefined | null | void }
67- * New tree (the default is to assume the tree is mutated ).
67+ * New tree or nothing (in which case the current tree is used ).
6868 *
6969 * @callback Handle
7070 * Handle a token.
9292 *
9393 * @callback OnExitError
9494 * Handle the case where the `right` token is open but it is closed by
95- * exitting the `left` token.
95+ * exiting the `left` token.
9696 * @param {Omit<CompileContext, 'sliceSerialize'> } this
9797 * Context.
9898 * @param {Token } left
125125 * Change how markdown tokens from micromark are turned into mdast.
126126 *
127127 * @typedef CompileContext
128- * mdast compiler context
128+ * mdast compiler context.
129129 * @property {Array<Node | Fragment> } stack
130130 * Stack of nodes.
131131 * @property {Array<TokenTuple> } tokenStack
132132 * Stack of tokens.
133- * @property {<Key extends keyof CompileData>(key: Key, value?: CompileData[Key]) => void } setData
134- * Set data into the key-value store.
135133 * @property {<Key extends keyof CompileData>(key: Key) => CompileData[Key] } getData
136- * Get data from the key-value store.
134+ * Get data from the key/value store.
135+ * @property {<Key extends keyof CompileData>(key: Key, value?: CompileData[Key]) => void } setData
136+ * Set data into the key/value store.
137137 * @property {(this: CompileContext) => void } buffer
138138 * Capture some of the output data.
139139 * @property {(this: CompileContext) => string } resume
150150 * @typedef FromMarkdownOptions
151151 * Configuration for how to build mdast.
152152 * @property {Array<Extension | Array<Extension>> | null | undefined } [mdastExtensions]
153- * Extensions to change how tokens are turned into a tree.
153+ * Extensions for this utility to change how tokens are turned into a tree.
154154 *
155155 * @typedef {ParseOptions & FromMarkdownOptions } Options
156+ * Configuration.
156157 */
157158
158159// To do: micromark: create a registry of tokens?
@@ -177,9 +178,9 @@ const own = {}.hasOwnProperty
177178
178179/**
179180 * @param value
180- * Markdown to parse (`string` or `Buffer`) .
181+ * Markdown to parse.
181182 * @param encoding
182- * Character encoding to understand `value` as when it’s a `Buffer` (`string`, default: `'utf8'`) .
183+ * Character encoding for when `value` is `Buffer`.
183184 * @param options
184185 * Configuration.
185186 * @returns
0 commit comments