@@ -13,19 +13,19 @@ HTML) again, keeping positional info okay.
13
13
14
14
## Contents
15
15
16
- * [ What is this?] ( #what-is-this )
17
- * [ When should I use this?] ( #when-should-i-use-this )
18
- * [ Install] ( #install )
19
- * [ Use] ( #use )
20
- * [ API] ( #api )
21
- * [ ` raw(tree[, options]) ` ] ( #rawtree-options )
22
- * [ ` Options ` ] ( #options )
23
- * [ Types] ( #types )
24
- * [ Compatibility] ( #compatibility )
25
- * [ Security] ( #security )
26
- * [ Related] ( #related )
27
- * [ Contribute] ( #contribute )
28
- * [ License] ( #license )
16
+ * [ What is this?] ( #what-is-this )
17
+ * [ When should I use this?] ( #when-should-i-use-this )
18
+ * [ Install] ( #install )
19
+ * [ Use] ( #use )
20
+ * [ API] ( #api )
21
+ * [ ` raw(tree[, options]) ` ] ( #rawtree-options )
22
+ * [ ` Options ` ] ( #options )
23
+ * [ Types] ( #types )
24
+ * [ Compatibility] ( #compatibility )
25
+ * [ Security] ( #security )
26
+ * [ Related] ( #related )
27
+ * [ Contribute] ( #contribute )
28
+ * [ License] ( #license )
29
29
30
30
## What is this?
31
31
@@ -53,10 +53,10 @@ If your final result is HTML and you trust content, then “strings” are fine
53
53
HTML through untouched).
54
54
But there are two main cases where a proper syntax tree is preferred:
55
55
56
- * hast utilities need a proper syntax tree as they operate on actual nodes to
57
- inspect or transform things, they can’t operate on strings of HTML
58
- * other output formats (React, MDX, etc) need actual nodes and can’t handle
59
- strings of HTML
56
+ * hast utilities need a proper syntax tree as they operate on actual nodes to
57
+ inspect or transform things, they can’t operate on strings of HTML
58
+ * other output formats (React, MDX, etc) need actual nodes and can’t handle
59
+ strings of HTML
60
60
61
61
The plugin [ ` rehype-raw ` ] [ rehype-raw ] wraps this utility at a higher-level
62
62
(easier) abstraction.
@@ -127,10 +127,10 @@ nodes into actual nodes.
127
127
128
128
###### Parameters
129
129
130
- * ` tree ` ([ ` Node ` ] [ node ] )
131
- — original hast tree to transform
132
- * ` options ` ([ ` Options ` ] [ api-options ] , optional)
133
- — configuration
130
+ * ` tree ` ([ ` Node ` ] [ node ] )
131
+ — original hast tree to transform
132
+ * ` options ` ([ ` Options ` ] [ api-options ] , optional)
133
+ — configuration
134
134
135
135
###### Returns
136
136
@@ -142,12 +142,12 @@ Configuration (TypeScript type).
142
142
143
143
###### Fields
144
144
145
- * ` passThrough ` (` Array<string> ` , optional)
146
- — list of custom hast node types to pass through (keep).
147
- If the passed through nodes have children, those children are expected to be
148
- hast and will be handled by this utility
149
- * ` file ` ([ ` VFile ` ] [ vfile ] , optional)
150
- — corresponding virtual file representing the input document
145
+ * ` passThrough ` (` Array<string> ` , optional)
146
+ — list of custom hast node types to pass through (keep).
147
+ If the passed through nodes have children, those children are expected to be
148
+ hast and will be handled by this utility
149
+ * ` file ` ([ ` VFile ` ] [ vfile ] , optional)
150
+ — corresponding virtual file representing the input document
151
151
152
152
## Types
153
153
@@ -189,10 +189,10 @@ Either do not use this utility in combination with user input, or use
189
189
190
190
## Related
191
191
192
- * [ ` mdast-util-to-hast ` ] [ mdast-util-to-hast ]
193
- — transform mdast to hast
194
- * [ ` rehype-raw ` ] ( https://github.com/rehypejs/rehype-raw )
195
- — rehype plugin
192
+ * [ ` mdast-util-to-hast ` ] [ mdast-util-to-hast ]
193
+ — transform mdast to hast
194
+ * [ ` rehype-raw ` ] ( https://github.com/rehypejs/rehype-raw )
195
+ — rehype plugin
196
196
197
197
## Contribute
198
198
0 commit comments