Hello Jeremy,
this is a known but unsolved problem. The root of it to intersecting scopes, which could not be...
Because everything between <% and %> is one scope and could be collapsed and for - end for is also scope and can be collapsed. So we have scope for - end for staring in one scope (first line) and ending in another scope third line. And this situation could not be easy solved, because in normal case, scope could not intersect, but can only include each other or be neighbor.
Also such intersection could not be visualized. So there is two possible solutions:
- disable scope recognition for embedded syntaxes (result would be you could not collapse any, even not intersecting area)
- build extended logic for recognizing such cases and excluding them from scope consistency check. This solution probably better, but require more time.
I would try to "fix" this, but probably would take some time (maybe week). Such problem is often noticeable also in PHP code and was already reported.
Best regards,
Alex