Skip to content

Commit 4f2e1d3

Browse files
committed
Refactor docs
1 parent 6fe681d commit 4f2e1d3

File tree

1 file changed

+26
-16
lines changed

1 file changed

+26
-16
lines changed

Diff for: readme.md

+26-16
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@ utility and `parse5` to both parse HTML and generate hast from it.
4444
## Install
4545

4646
This 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
5051
npm 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).
140143
File 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
160168
For the following HTML:
161169

@@ -222,9 +230,10 @@ It exports the additional types [`Options`][api-options] and
222230
Projects maintained by the unified collective are compatible with maintained
223231
versions 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`,
228237
compatible with Node.js 16.
229238
230239
## Security
@@ -256,8 +265,9 @@ for ways to get started.
256265
See [`support.md`][health-support] for ways to get help.
257266
258267
This 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

Comments
 (0)