ProseMirror / prosemirror-tables

Table module for ProseMirror
https://prosemirror-tables.netlify.app/
MIT License
259 stars 155 forks source link

Fix deleteRow for cells with colspan greater than 1 #213

Closed weijia18 closed 10 months ago

weijia18 commented 11 months ago

The original table

image

The table after deleting a row

image the cell whose colspan is 2 marked in the green box is inserted twice. In this commit, I added a variable "seen" to the function removeRow to skip the cells have been processed

weijia18 commented 10 months ago

@ocavue, could you have a check?

ocavue commented 10 months ago

Could you add some tests here? Thanks!

weijia18 commented 10 months ago

Could you add some tests here? Thanks!

I am sorry that i am not aware of adding a test for that fix,since this is my first time to contribute to the opening community

weijia18 commented 10 months ago

@ocavue I have added two new test cases for deleteRow, is these enough? Please have a check.

ocavue commented 10 months ago

Thanks! Your code looks great. I will release it today.