Closed Veetaha closed 4 years ago
I don't think this is wrong. When we receive an offset equivalent to the length of the selected span, the correct token to say is present there is None
, as is handled for the empty span case directly below the assert.
An actual example (other than an empty span) that passes the assert on master and is caught by this patch would help in determining the correct/expected behavior here.
Oh, I just read the precondition comment and saw the assertion that kinda conflicts with it...
Yep, text offset can point right at the end of the node/file, it can be equal to the length of the thing.
?