Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In
Table.set_span
there are a bunch of redundant checks for borders and number of bordered edges that this commit simplifies. Additionally the vertical and horizontal spans are independent of each other, therefore these checks can be untangled.I think that this actually uncovered a bug in the old implementation. For the cases where both horizontally and vertically only one of both edges are bordered there are differences with this commit.
This change in behaviour of the
Table.set_span
method is a bug fix. I guess in the original code it was missed that a cell could both horizontally and vertically span to other cells if the two bordered edges are not on the same direction.