productboard / slate-edit-list

A Slate plugin to handle keyboard events in lists.
https://gitbookio.github.io/slate-edit-list/
Apache License 2.0
25 stars 9 forks source link

fix: rewrite of list item normalizer #19

Closed PrchalTomas closed 4 years ago

PrchalTomas commented 4 years ago

Instead of checking in child of list whether it's an element, we now check that list has all children as elements. This prevents unintended wrapping of multiple text nodes (as would be the case for different marks on the same line) in same number of paragraphs. Original caused a bug, where single list item with multiple marks was spread onto multiple lines, one per mark.