Quote:
Originally Posted by chrisridd
Attached are the two files from the original mangled run.
|
I think I see the problem, and it should be an easy fix. Not to get too detailed, but I believe the current code uses one line to look for three patterns, with the middle one mandatory and the outer ones optional. The trouble is, the outer ones are supposed to be optional together, not separately - and in these cases, one of the outer patterns (the closing /DIV) gets detected without the other (the opening DIV). The code then removes the anchor and closing tag, thus creating a mismatch.
If that's correct, I just need to adjust the code to make it two lines instead of one: one with the anchor enclosed by the DIV tags (not optional), followed by one with just the anchor. Since neither new pattern allows for a mismatch, the problem should be solved.
I should get a chance to look into that tomorrow (er, later today) sometime - thanks for the useful bug report!