-
-
Notifications
You must be signed in to change notification settings - Fork 16
/
index.js
47 lines (45 loc) · 1.02 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
/**
* rehype plugin to minify whitespace between elements.
*
* ## What is this?
*
* This package is a plugin that can minify the whitespace between elements.
*
* ## When should I use this?
*
* You can use this plugin when you want to improve the size of HTML documents.
*
* ## API
*
* ### `unified().use(rehypeMinifyWhitespace[, options])`
*
* Minify whitespace.
*
* ###### Parameters
*
* * `options` (`Options`, optional)
* — configuration
*
* ###### Returns
*
* Transform ([`Transformer`](https://github.com/unifiedjs/unified#transformer)).
*
* ### `Options`
*
* Configuration (TypeScript).
*
* ###### Fields
*
* * `newlines` (`boolean`, default: `false`)
* — collapse whitespace containing newlines to `'\n'` instead of `' '`;
* the default is to collapse to a single space
*
* @example
* {}
* <h1>Heading</h1>
* <p><strong>This</strong> and <em>that</em></p>
*/
/**
* @typedef {import('hast-util-minify-whitespace').Options} Options
*/
export {default} from './lib/index.js'