File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -51,14 +51,22 @@ root[2] (1:1-2:1, 0-70) [data={"quirksMode":false}]
51
51
52
52
## API
53
53
54
- ### ` toParse5 (ast[, options])`
54
+ ### ` fromParse5 (ast[, options])`
55
55
56
56
Transform an ` ASTNode ` to a [ HAST Node] [ node ] .
57
57
58
58
##### ` options `
59
59
60
60
If ` options ` is a [ VFile] [ ] , it’s treated as ` {file: options} ` .
61
61
62
+ ###### ` options.space `
63
+
64
+ Whether the root of the given tree is in the ` 'html' ` or ` 'svg' ` space (enum,
65
+ ` 'svg' ` or ` 'html' ` , default: ` 'html' ` ).
66
+
67
+ If an ` svg ` element is found in the HTML space, ` toHTML ` automatically switches
68
+ to the SVG space when entering the element, and switches back when leaving.
69
+
62
70
###### ` options.file `
63
71
64
72
[ Virtual file] [ vfile ] , used to add positional information to HAST nodes.
You can’t perform that action at this time.
0 commit comments