Closed bdbch closed 1 month ago
Latest commit: 91ad89fb7e682adff1b0331718dd81e400d6c03e
The changes in this PR will be included in the next version bump.
Not sure what this means? Click here to learn what changesets are.
Click here if you're a maintainer who wants to add another changeset to this PR
Name | Link |
---|---|
Latest commit | 91ad89fb7e682adff1b0331718dd81e400d6c03e |
Latest deploy log | https://app.netlify.com/sites/tiptap-embed/deploys/6707983c57cccd0008f97548 |
Deploy Preview | https://deploy-preview-5717--tiptap-embed.netlify.app |
Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site configuration.
Changes Overview
This pull request addresses an issue in the
@tiptap/core
package where thegetMarkRange
function did not return the correct range when the cursor was at the start of the specified mark. The changes involve both documentation and code modifications to ensure accurate behavior.Bug Fix:
packages/core/src/helpers/getMarkRange.ts
: Updated thegetMarkRange
function to correctly handle cases where the cursor is at the start of a text node without the mark, ensuring it looks backward and returns the appropriate range.Implementation Approach
You can find out more about my implementation from the comments in code. I basically added a forward, then backward check for marks on the current nodes parent with the parent offset.
Testing Done
Tested it locally on my machine in a demo I build. (See below)
Verification Steps
My demo:
Additional Notes
Nothing to add here
Checklist
Related Issues
Fixes #5715