Skip to content

Commit e4caf67

Browse files
committed
Update rehype-minify-whitespace
1 parent 42fe278 commit e4caf67

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

lib/index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@
1212
* @typedef {import('./types.js').MdastRoot} MdastRoot
1313
*/
1414

15-
// @ts-expect-error: next.
16-
import minifyWhitespace from 'rehype-minify-whitespace'
15+
import rehypeMinifyWhitespace from 'rehype-minify-whitespace'
1716
import {convert} from 'unist-util-is'
1817
import {visit} from 'unist-util-visit'
1918
import {one} from './one.js'
@@ -107,7 +106,8 @@ export function toMdast(tree, options = {}) {
107106
}
108107
})
109108

110-
minifyWhitespace({newlines: options.newlines === true})(tree)
109+
// @ts-expect-error: does return a transformer, that does accept any node.
110+
rehypeMinifyWhitespace({newlines: options.newlines === true})(tree)
111111

112112
const result = one(h, tree, undefined)
113113

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
"hast-util-to-text": "^3.0.0",
4747
"mdast-util-phrasing": "^3.0.0",
4848
"mdast-util-to-string": "^3.0.0",
49-
"rehype-minify-whitespace": "^4.0.0",
49+
"rehype-minify-whitespace": "^5.0.0",
5050
"repeat-string": "^1.0.0",
5151
"trim-trailing-lines": "^2.0.0",
5252
"unist-util-is": "^5.0.0",

0 commit comments

Comments
 (0)