1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-02-24 01:02:31 +01:00
Andrew Cobby d6901aa416 Add failing test showing splitBlock with isVoid bug (#276)
* Add failing test showing splitBlock with isVoid bug

Not sure what I actually expected calling `splitBlock()` on void block, but I
would expect `splitBlock()` to respect a given block type's isVoid property.
This failing test demonstrates that `splitBlock()` always creates a the new
block with `isVoid: false`.

* Fix isVoid not being copied when using splitBlock()

The bug was actually inside `splitBlockAtRange`, as that's what actual drives
`splitBlock()` (I assume the bug was therefore present in both methods). The
fix is to simply copy across the `isVoid` value from the block being copied.
2016-09-04 21:19:00 -07:00
..
2016-08-14 18:25:12 -07:00
2016-08-17 02:58:35 -07:00

This directory contains the core logic of Slate. It's separated further into a series of directories:

  • Components — containing the React components Slate renders.
  • Models — containing the models that define Slate's internal data structure.
  • Plugins — containing the plugins that ship with Slate by default.
  • Serializers — containing the serializers that ship with Slate by default.
  • Utils — containing a few private convenience modules.

Feel free to poke around in each of them to learn more!