ensure removeMark can pluck multiple matches from a node #17
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "patch"
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?
hi there! 👋
currently
removeMark(from, to, MarkType)only removes the first match it encounters within each block. this change aligns the behavior with the documentation and removes them all instead.Thanks. This is indeed a bug, but in
MarkType.removeFromSet. Attached patch fixes it there.that works too. thanks for all your efforts as a maintainer!
i just pulled down the latest release of prosemirror-models and it doesn't resolve the bug we noticed in our own application.
this is because Transform.removeMark() is still only grabbing the first result returned by
isInSet()github.com/ProseMirror/prosemirror-transform@99394291d6/src/mark.js (L51-L52)Oh, that's a good point—the other issue was actually a different problem. I've merged this but my fix broke your code, so I added
47cbf5fd.very cool! i appreciate it. 🙏
Pull request closed