-
-
Notifications
You must be signed in to change notification settings - Fork 16
/
index.js
41 lines (40 loc) · 1.12 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
/**
* rehype plugin to remove `meta[http-equiv=content-language]` and
* `meta[http-equiv=content-type]`.
*
* ## What is this?
*
* This package is a plugin that removes `<meta>` elements with `http-equiv`
* attributes.
* These `<meta>` elements can set the character encoding and natural language
* of the document, but there are shorter ways to do that.
*
* ## When should I use this?
*
* You can use this plugin when you want to improve the transfer size of HTML
* documents.
*
* ## API
*
* ### `unified().use(rehypeRemoveMetaHttpEquiv)`
*
* Remove `meta[http-equiv=content-language]` and
* `meta[http-equiv=content-type]`.
*
* ###### Returns
*
* Transform ([`Transformer`](https://github.com/unifiedjs/unified#transformer)).
*
* @example
* {"processor": {"fragment": false}, "format": true}
* <!doctype html>
* <html lang="en-GB">
* <head>
* <meta charset="utf8">
* <meta http-equiv="content-type" content="text/html; charset=chinese">
* <meta http-equiv="content-language" content="en-US">
* </head>
* <body></body>
* </html>
*/
export {default} from './lib/index.js'