Skip to content

Commit a52745c

Browse files
committed
Fix readme.md
1 parent 1477ff7 commit a52745c

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

readme.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,20 @@ Yields:
4040

4141
## API
4242

43-
### `toParse5(node)`
43+
### `toParse5(tree[, space])`
4444

4545
Transform a [HAST Node][node] to an `ASTNode` according to the default
4646
Parse5 adapter.
4747

48+
###### `space`
49+
50+
Whether the root of the given tree is in the `'html'` or `'svg'` space (enum,
51+
`'svg'` or `'html'`, default: `'html'`).
52+
53+
If an `svg` element is found in the HTML space, `toParse5` automatically
54+
switches to the SVG space when entering the element, and switches back when
55+
leaving.
56+
4857
## Contribute
4958

5059
See [`contributing.md` in `syntax-tree/hast`][contributing] for ways to get

0 commit comments

Comments
 (0)