Skip to content

Fix nested addMarkSteps inside insertions. - #20

Merged
smoores-dev merged 3 commits into
handlewithcarecollective:mainfrom
Magic-Marker:add-mark-step-inline-nodes
Aug 27, 2025
Merged

Fix nested addMarkSteps inside insertions.#20
smoores-dev merged 3 commits into
handlewithcarecollective:mainfrom
Magic-Marker:add-mark-step-inline-nodes

Conversation

@VV-EE

@VV-EE VV-EE commented Jul 23, 2025

Copy link
Copy Markdown
Contributor

Based off #18
Inside an existing suggestion if there was a Mark already a transaction was sent to add another Mark inside that there was a nodeSize error.
https://discuss.prosemirror.net/t/new-transform-with-leaf-text-node/8488/2 helps to understand the issue.

@smoores-dev
smoores-dev force-pushed the add-mark-step-inline-nodes branch from 5c05751 to b70b3e1 Compare August 27, 2025 15:34
smoores-dev
smoores-dev previously approved these changes Aug 27, 2025
@smoores-dev

Copy link
Copy Markdown
Member

I ended up changing this quite a bit. The initial approach I had was flawed ­— I should have never been iterating over the nodes in the slice and applying suggestions to them. This meant that I was never applying suggestions/modifications on those nodes (and also was the source of the range error you ran into). Now, instead, we always operate on the whole doc, but can optionally provide a range for situations where we only care about applying suggestions to a slice of the doc.

@smoores-dev
smoores-dev merged commit e45e683 into handlewithcarecollective:main Aug 27, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants