@@ -44,7 +44,8 @@ utility and `parse5` to both parse HTML and generate hast from it.
4444## Install
4545
4646This package is [ ESM only] [ github-gist-esm ] .
47- In Node.js (version 16+), install with [ npm] [ npmjs-install ] :
47+ In Node.js (version 16+),
48+ install with [ npm] [ npmjs-install ] :
4849
4950``` sh
5051npm install hast-util-from-parse5
@@ -120,9 +121,11 @@ Transform a `parse5` AST to hast.
120121
121122###### Parameters
122123
123- * ` tree ` ([ ` Parse5Node ` ] [ github-parse5-node ] )
124+ * ` tree `
125+ ([ ` Parse5Node ` ] [ github-parse5-node ] )
124126 — ` parse5 ` tree to transform
125- * ` options ` ([ ` Options ` ] [ api-options ] , optional)
127+ * ` options `
128+ ([ ` Options ` ] [ api-options ] , optional)
126129 — configuration
127130
128131###### Returns
@@ -140,22 +143,27 @@ Configuration (TypeScript type).
140143File used to add positional info to nodes
141144([ ` VFile ` ] [ github-vfile ] , optional).
142145
143- If given, the file should represent the original HTML source.
146+ If given,
147+ the file should represent the original HTML source.
144148
145149###### ` space `
146150
147- Which space the document is in ([ ` Space ` ] [ api-space ] , default: ` 'html' ` ).
151+ Which space the document is in
152+ ([ ` Space ` ] [ api-space ] , default: ` 'html' ` ).
148153
149- When an ` <svg> ` element is found in the HTML space, this package already
150- automatically switches to and from the SVG space when entering and exiting
151- it.
154+ When an ` <svg> ` element is found in the HTML space,
155+ this package already automatically switches to and from the SVG space when
156+ entering and exiting it.
152157
153158###### ` verbose `
154159
155- Whether to add extra positional info about starting tags, closing tags,
156- and attributes to elements (` boolean ` , default: ` false ` ).
160+ Whether to add extra positional info about starting tags,
161+ closing tags,
162+ and attributes to elements
163+ (` boolean ` , default: ` false ` ).
157164
158- > 👉 ** Note** : only used when ` file ` is given.
165+ > 👉 ** Note** :
166+ > only used when ` file ` is given.
159167
160168For the following HTML:
161169
@@ -222,9 +230,10 @@ It exports the additional types [`Options`][api-options] and
222230Projects maintained by the unified collective are compatible with maintained
223231versions of Node.js.
224232
225- When we cut a new major release, we drop support for unmaintained versions of
226- Node.
227- This means we try to keep the current release line, ` hast -util -from -parse5 @^8 ` ,
233+ When we cut a new major release,
234+ we drop support for unmaintained versions of Node.
235+ This means we try to keep the current release line,
236+ ` hast -util -from -parse5 @8 ` ,
228237compatible with Node.js 16.
229238
230239## Security
@@ -256,8 +265,9 @@ for ways to get started.
256265See [ ` support .md ` ][health-support] for ways to get help.
257266
258267This project has a [code of conduct][health-coc].
259- By interacting with this repository, organization, or community you agree to
260- abide by its terms.
268+ By interacting with this repository,
269+ organization,
270+ or community you agree to abide by its terms.
261271
262272## License
263273
0 commit comments