Skip to content

Commit 7b46519

Browse files
committed
Update dev-dependencies
1 parent bdef16b commit 7b46519

File tree

2 files changed

+44
-42
lines changed

2 files changed

+44
-42
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@
4444
"c8": "^9.0.0",
4545
"hastscript": "^9.0.0",
4646
"prettier": "^3.0.0",
47-
"remark-cli": "^11.0.0",
48-
"remark-preset-wooorm": "^9.0.0",
47+
"remark-cli": "^12.0.0",
48+
"remark-preset-wooorm": "^10.0.0",
4949
"type-coverage": "^2.0.0",
5050
"typescript": "^5.0.0",
5151
"xo": "^0.58.0"

readme.md

Lines changed: 42 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -12,20 +12,20 @@
1212

1313
## Contents
1414

15-
* [What is this?](#what-is-this)
16-
* [When should I use this?](#when-should-i-use-this)
17-
* [Install](#install)
18-
* [Use](#use)
19-
* [API](#api)
20-
* [`toText(tree[, options])`](#totexttree-options)
21-
* [`Options`](#options)
22-
* [`Whitespace`](#whitespace)
23-
* [Types](#types)
24-
* [Compatibility](#compatibility)
25-
* [Security](#security)
26-
* [Related](#related)
27-
* [Contribute](#contribute)
28-
* [License](#license)
15+
* [What is this?](#what-is-this)
16+
* [When should I use this?](#when-should-i-use-this)
17+
* [Install](#install)
18+
* [Use](#use)
19+
* [API](#api)
20+
* [`toText(tree[, options])`](#totexttree-options)
21+
* [`Options`](#options)
22+
* [`Whitespace`](#whitespace)
23+
* [Types](#types)
24+
* [Compatibility](#compatibility)
25+
* [Security](#security)
26+
* [Related](#related)
27+
* [Contribute](#contribute)
28+
* [License](#license)
2929

3030
## What is this?
3131

@@ -111,46 +111,46 @@ Get the plain-text value of a node.
111111

112112
###### Parameters
113113

114-
* `tree` ([`Node`][node])
115-
— tree to turn into text
116-
* `options` ([`Options`][api-options], optional)
117-
— configuration
114+
* `tree` ([`Node`][node])
115+
— tree to turn into text
116+
* `options` ([`Options`][api-options], optional)
117+
— configuration
118118

119119
###### Returns
120120

121121
Serialized `tree` (`string`).
122122

123123
###### Algorithm
124124

125-
* if `tree` is a [comment][], returns its `value`
126-
* if `tree` is a [text][], applies normal whitespace collapsing to its
127-
`value`, as defined by the [CSS Text][css] spec
128-
* if `tree` is a [root][] or [element][], applies an algorithm similar to the
129-
`innerText` getter as defined by [HTML][]
125+
* if `tree` is a [comment][], returns its `value`
126+
* if `tree` is a [text][], applies normal whitespace collapsing to its
127+
`value`, as defined by the [CSS Text][css] spec
128+
* if `tree` is a [root][] or [element][], applies an algorithm similar to the
129+
`innerText` getter as defined by [HTML][]
130130

131131
###### Notes
132132

133133
> 👉 **Note**: the algorithm acts as if `tree` is being rendered, and as if
134134
> we’re a CSS-supporting user agent, with scripting enabled.
135135
136-
* if `tree` is an element that is not displayed (such as a `head`), we’ll
137-
still use the `innerText` algorithm instead of switching to `textContent`
138-
* if descendants of `tree` are elements that are not displayed, they are
139-
ignored
140-
* CSS is not considered, except for the default user agent style sheet
141-
* a line feed is collapsed instead of ignored in cases where Fullwidth, Wide,
142-
or Halfwidth East Asian Width characters are used, the same goes for a case
143-
with Chinese, Japanese, or Yi writing systems
144-
* replaced elements (such as `audio`) are treated like non-replaced elements
136+
* if `tree` is an element that is not displayed (such as a `head`), we’ll
137+
still use the `innerText` algorithm instead of switching to `textContent`
138+
* if descendants of `tree` are elements that are not displayed, they are
139+
ignored
140+
* CSS is not considered, except for the default user agent style sheet
141+
* a line feed is collapsed instead of ignored in cases where Fullwidth, Wide,
142+
or Halfwidth East Asian Width characters are used, the same goes for a case
143+
with Chinese, Japanese, or Yi writing systems
144+
* replaced elements (such as `audio`) are treated like non-replaced elements
145145

146146
### `Options`
147147

148148
Configuration (TypeScript type).
149149

150150
##### Fields
151151

152-
* `whitespace` ([`Whitespace`][api-whitespace], default: `'normal'`)
153-
— default whitespace setting to use
152+
* `whitespace` ([`Whitespace`][api-whitespace], default: `'normal'`)
153+
— default whitespace setting to use
154154

155155
### `Whitespace`
156156

@@ -185,12 +185,14 @@ openings for [cross-site scripting (XSS)][xss] attacks.
185185
186186
## Related
187187
188-
* [`hast-util-to-string`](https://github.com/rehypejs/rehype-minify/tree/main/packages/hast-util-to-string)
189-
— get the plain-text value (`textContent`)
190-
* [`hast-util-from-text`](https://github.com/syntax-tree/hast-util-from-text)
191-
— set the plain-text value (`innerText`)
192-
* [`hast-util-from-string`](https://github.com/rehypejs/rehype-minify/tree/main/packages/hast-util-from-string)
193-
— set the plain-text value (`textContent`)
188+
* [`hast-util-to-string`
189+
](https://github.com/rehypejs/rehype-minify/tree/main/packages/hast-util-to-string)
190+
— get the plain-text value (`textContent`)
191+
* [`hast-util-from-text`](https://github.com/syntax-tree/hast-util-from-text)
192+
— set the plain-text value (`innerText`)
193+
* [`hast-util-from-string`
194+
](https://github.com/rehypejs/rehype-minify/tree/main/packages/hast-util-from-string)
195+
— set the plain-text value (`textContent`)
194196
195197
## Contribute
196198

0 commit comments

Comments
 (0)