-
Notifications
You must be signed in to change notification settings - Fork 151
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pasting text that contains a newline inside a list throws an error #456
Comments
I figured it's because A solution would be to turn the parser into a "context-dependent" parser, i.e. if the cursor is in a list, then parse this particular example as list items, else as paragraphs. Any thoughts on this @bantic @mixonic? Alternatively, do a transform when inserting the items to the list section. |
@YoranBrondsema Thanks for the detailed bug description...I'm looking into it this morning. |
Added a failing test here: https://github.com/bustlelabs/mobiledoc-kit/compare/456-fix-inserting-sections-into-list |
The first section is merged, subsequent sections form new list items. Fixes #456
@bantic Wow, many thanks! |
@YoranBrondsema no problem. Thank you for the detailed description! released in v0.10.6 |
To reproduce
You would expect it to create a new list item for each line of text but instead it throws an error
Uncaught Error: Cannot insert non-list-item to list (is: markup-section)
.The text was updated successfully, but these errors were encountered: