Bug
Pasting " anywhere in slate throws the following error.
Here is a very basic jsfiddle where the error can be reproduced: https://jsfiddle.net/4wzp6hxa/3/
Tested on Windows in Firefox with the latest version of Slate
" should be pasted into the editor.
Just noticed that if the string contains at least one space the error is not thrown. Ex. 'asd asd"'
Couldn't reproduce the bug on Mac in Chrome, Safari, or Firefox.
" pasted as expected.
Looked at it some more today and can only reproduce in Firefox think the error I had in Chrome was entirely different (Sorry yesterday was a looong day). Updated the original comment with a new error stack
Clarification: this seems to be the case in Firefox when copying a " character from within Slate, and then trying to paste it. Clipboard reveals:
<span data-slate-fragment="JTdCJTIyZGF0YSUyMiUzQSU3QiU3RCUyQyUyMmtpbmQlMjIlM0ElMjJkb2N1bWVudCUyMiUyQyUyMm5vZGVzJTIyJTNBJTVCJTdCJTIyZGF0YSUyMiUzQSU3QiU3RCUyQyUyMmtpbmQlMjIlM0ElMjJibG9jayUyMiUyQyUyMmlzVm9pZCUyMiUzQWZhbHNlJTJDJTIydHlwZSUyMiUzQSUyMnBhcmFncmFwaCUyMiUyQyUyMm5vZGVzJTIyJTNBJTVCJTdCJTIya2luZCUyMiUzQSUyMnRleHQlMjIlMkMlMjJyYW5nZXMlMjIlM0ElNUIlN0IlMjJraW5kJTIyJTNBJTIycmFuZ2UlMjIlMkMlMjJ0ZXh0JTIyJTNBJTIyJTVDJTIyJTIyJTJDJTIybWFya3MlMjIlM0ElNUIlNUQlN0QlNUQlN0QlNUQlN0QlNUQlN0Q=">"</span>
for mime text/html.
The problem was with the FRAGMENT_MATCHER regex matching the data-slate-fragment too greedily. Fixed in PR above.