@@ -18,8 +18,8 @@ HTML) again, keeping positional info okay.
1818* [ Install] ( #install )
1919* [ Use] ( #use )
2020* [ API] ( #api )
21- * [ ` raw(tree[, options]) ` ] ( #rawtree-options )
2221 * [ ` Options ` ] ( #options )
22+ * [ ` raw(tree, options) ` ] ( #rawtree-options )
2323* [ Types] ( #types )
2424* [ Compatibility] ( #compatibility )
2525* [ Security] ( #security )
@@ -117,37 +117,36 @@ Yields:
117117
118118## API
119119
120- This package exports the identifier [ ` raw ` ] [ api-raw ] .
121- There is no default export.
120+ ### ` Options `
122121
123- ### ` raw(tree[, options]) `
122+ Configuration.
124123
125- Pass a hast tree through an HTML parser, which will fix nesting, and turn raw
126- nodes into actual nodes.
124+ ###### Fields
127125
128- ###### Parameters
126+ * ` file? ` (` VFile | null | undefined ` )
127+ — corresponding virtual file representing the input document (optional)
128+ * ` passThrough? ` (` Array<string> | null | undefined ` )
129129
130- * ` tree ` ([ ` Node ` ] [ node ] )
131- — original hast tree to transform
132- * ` options ` ([ ` Options ` ] [ api-options ] , optional)
133- — configuration
130+ List of custom hast node types to pass through (as in, keep) (optional).
134131
135- ###### Returns
132+ If the passed through nodes have children, those children are expected to
133+ be hast again and will be handled.
136134
137- Parsed again tree ( [ ` Node ` ] [ node ] ).
135+ ### ` raw( tree, options) `
138136
139- ### ` Options `
137+ Pass a hast tree through an HTML parser, which will fix nesting, and turn
138+ raw nodes into actual nodes.
139+
140+ ###### Parameters
140141
141- Configuration (TypeScript type).
142+ * ` tree ` (` Root | RootContent ` )
143+ — original hast tree to transform
144+ * ` options? ` (` Options | null | undefined ` )
145+ — configuration (optional)
142146
143- ###### Fields
147+ ###### Returns
144148
145- * ` passThrough ` (` Array<string> ` , optional)
146- — list of custom hast node types to pass through (keep).
147- If the passed through nodes have children, those children are expected to be
148- hast and will be handled by this utility
149- * ` file ` ([ ` VFile ` ] [ vfile ] , optional)
150- — corresponding virtual file representing the input document
149+ Parsed again tree (` Root | RootContent ` ).
151150
152151## Types
153152
@@ -260,18 +259,12 @@ abide by its terms.
260259
261260[ hast ] : https://github.com/syntax-tree/hast
262261
263- [ node ] : https://github.com/syntax-tree/hast#nodes
264-
265262[ mdast-util-to-hast ] : https://github.com/syntax-tree/mdast-util-to-hast
266263
267264[ hast-util-sanitize ] : https://github.com/syntax-tree/hast-util-sanitize
268265
269- [ vfile ] : https://github.com/vfile/vfile
270-
271266[ rehype-raw ] : https://github.com/rehypejs/rehype-raw
272267
273268[ parse5 ] : https://github.com/inikulin/parse5
274269
275- [ api-raw ] : #rawtree-options
276-
277270[ api-options ] : #options
0 commit comments