formulahendry / vscode-auto-rename-tag

Automatically rename paired HTML/XML tag
https://marketplace.visualstudio.com/items?itemName=formulahendry.auto-rename-tag
MIT License
262 stars 36 forks source link

Extension stops working when tag name is appended with `=` sign in a specific manner. #629

Open manav-sharma69 opened 5 months ago

manav-sharma69 commented 5 months ago

Let's say a we have an element <div class="text">...</div>.

Here, if I put my cursor right after the letter v in opening <div> tag, and then if I delete the class attribute from there by pressing key combination Ctrl+Delete, then the class keyword gets deleted and the equals to sign = is right next to the element's name div like this <div="text">. But, the equals to sign = automatically gets appended on the closing </div> tag also, it looks like this </div=>. Then, if you press the key combination Ctrl+Delete once again, the equals sign appended automatically on closing div does not go away (it does if you just press Delete).

And then, the extension stops working.

Even if I remove the remaining text (attributes and stuff) and the equals to sign =, the closing tag remains unresponsive, like this: </div=>

I've attached relevant screenshots below:

Initial <div> tag with cursor in place:

divImg1

class attribute removed and closing </div> tag automatically gets appended with =:

divImgClassDeleted

The extension stops working after the equals to = is automatically appended. The " mark is the ending double-quotes of the class attribute's value "text":

divImgExtNotWorking

That's all!