Fix splitListItem when used with simpler list schema #1
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix-splitListItem-simpler-schema"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
splitListItemcurrently doesn't get applied (thecanSplitcondition ends up being false) when using a simpler list schema in whichlist_itemcontent is defined as"paragraph (ordered_list|bullet_list)?". This causes a bug when trying to split a list by pressing Enter with the caret at the end of a list item.This PR re-applies a previously submitted and accepted fix https://github.com/ProseMirror/prosemirror/pull/450.
PS: If you have any ideas on how to add tests for this to avoid further regressions, I'd be happy to help add some. The problem I'm hitting trying to add tests (besides https://github.com/ProseMirror/prosemirror/issues/526) is that they depend on a default helper schema from
prosemirror-model, and I can't see any easy way to derive a slightly modified schema to run tests against.Finally merged as
13f2eb2Creating tests should be easier now that the test-document-builder stuff was abstracted in https://github.com/prosemirror/prosemirror-test-builder
Pull request closed