Skip to content

Commit 0ea3a1c

Browse files
committed
Update readme.md
1 parent 837a2f0 commit 0ea3a1c

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

readme.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,14 +51,22 @@ root[2] (1:1-2:1, 0-70) [data={"quirksMode":false}]
5151

5252
## API
5353

54-
### `toParse5(ast[, options])`
54+
### `fromParse5(ast[, options])`
5555

5656
Transform an `ASTNode` to a [HAST Node][node].
5757

5858
##### `options`
5959

6060
If `options` is a [VFile][], it’s treated as `{file: options}`.
6161

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+
6270
###### `options.file`
6371

6472
[Virtual file][vfile], used to add positional information to HAST nodes.

0 commit comments

Comments
 (0)