The diff calculator was crashing when there was a change like: (blah, 1) -> (blah, ()) because it thought the ) from the () was related to the ending paren, which was just a syntax element and it didn't know how to create a hash-change annotation from the paren that was just a bracket.
Implementation notes
I've solved this case by just re-splitting any confusing cases into old and new chunks, which should fix this and any other cases I may have missed.
Overview
The diff calculator was crashing when there was a change like:
(blah, 1)
->(blah, ())
because it thought the)
from the()
was related to the ending paren, which was just a syntax element and it didn't know how to create a hash-change annotation from the paren that was just a bracket.Implementation notes
I've solved this case by just re-splitting any confusing cases into old and new chunks, which should fix this and any other cases I may have missed.
Test coverage
Added a regression test for this case.