1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-02-01 05:16:10 +01:00
slate/packages
Slapbox 611fa85b80 Fixes deleteWordForward at line ending (#2290)
#### Is this adding or improving a _feature_ or fixing a _bug_?
Bug fix - Very minor change

#### What's the new behavior?

`deleteWordBackward` at line ending behaves the same as `deleteCharForward`

#### How does this change work?

If `TextUtils.getWordOffsetForward(text, o)` returns 0, instead we substitute in `1` to delete the line break and join the blocks. The relevant test for this change (`join-blocks`) is also added.

#### Have you checked that...?

<!-- 
Please run through this checklist for your pull request: 
-->

* [x] The new code matches the existing patterns and styles.
* [x] The tests pass with `yarn test`.
* [x] The linter passes with `yarn lint`. (Fix errors with `yarn prettier`.)
* [x] The relevant examples still work. (Run examples with `yarn watch`.)

#### Does this fix any issues or need any specific reviewers?

Fixes: #2258
Reviewers: @ianstormtaylor
2018-10-24 15:46:01 -07:00
..
2018-10-22 15:24:10 -07:00
2018-08-01 12:07:02 -07:00
2018-08-16 15:26:05 -07:00
2018-08-01 12:07:02 -07:00
2018-10-24 14:52:39 -07:00
2018-10-22 15:24:10 -07:00
2018-10-22 15:24:10 -07:00
2018-10-22 15:24:10 -07:00
2018-10-22 15:24:10 -07:00
2018-10-24 14:52:39 -07:00