Skip to content

Commit

Permalink
docs: Fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
thesunny committed Jun 7, 2021
1 parent c86d0b0 commit 06121a3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/api/nodes/editor.md
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ Note: By default void nodes are treated as a single point and iteration will not

Options:

- `at?: Location = editor.selection`: The `Location` in which to iterate the postions of.
- `at?: Location = editor.selection`: The `Location` in which to iterate the positions of.
- `unit?: 'offset' | 'character' | 'word' | 'line' | 'block' = 'offset'`:
- `offset`: Moves to the next offset `Point`. It will include the `Point` at the end of a `Text` object and then move onto the first `Point` (at the 0th offset) of the next `Text` object. This may be counter-intuitive because the end of a `Text` and the beginning of the next `Text` might be thought of as the same position.
- `character`: Moves to the next `character` but is not always the next `index` in the string. This is because Unicode encodings may require multiple bytes to create one character. Unlike `offset`, `character` will not count the end of a `Text` and the beginning of the next `Text` as separate positions to return. Warning: This does not appear to be reliable in some cases like a Smiley Emoji will be identified as 2 characters.
Expand Down

0 comments on commit 06121a3

Please sign in to comment.