Closed phallwurst closed 6 years ago
Yes it has been reported before https://github.com/gandm/language-babel/issues/436 https://github.com/gandm/language-babel/issues/327 etc The matching isn't done by this package. It is actually a bug with https://github.com/atom/bracket-matcher
Bug report. Forgive me if this has been reported already or if a fix was made but has not yet been released.
I have noticed this problem for a while now, but only just now discovered what I believe to be the cause. When I have a div whose attributes are declared on multiple lines, the highlighting for corresponding opening and closing tags does not highlight the correct components.
In the below screenshot, my cursor is on the opening tag line of the innermost div, whose attributes are declared on multiple lines. In this screenshot, the opening and closing tag highlighting is correct.
In this screenshot, I have moved my cursor to the opening tag of the div that is one level above the innermost div. However, you can see that the highlighted closing tag still corresponds to the closing tag of the innermost div. If i place my cursor on the closing tag of the outermost div, it does not highlight anything.
In the below two screenshots, I have removed the id attribute from the innermost div so that the attributes no longer span multiple lines. As you can see, the opening and closing tag highlighting is now correct.
This is probably a fairly minor issue, but it can get a little confusing when the opening and closing tag highlighting doesn't match up properly. I don't know for sure if this is limited to just
div
elements, but I have only seen it with them. That is probably just becausediv
elements are most commonly nested like this. I hope this helps.