atom-double-tag icon indicating copy to clipboard operation
atom-double-tag copied to clipboard

Removes Tag Name When Deleting Closing Tag

Open mikebronner opened this issue 7 years ago • 5 comments

If i'm editing code, and cut the closing tag (for example to past it somewhere else in the code), it deletes that tag name from the opening tag, leaving me with a malformed tag:

<span class="test>
Test
</span>

becomes this, after cutting the closing tag:

< class="test">
Test

mikebronner avatar Sep 08 '17 20:09 mikebronner

Same here, self-closing tags are impossible. Similar to #25. A simple fix for this bug, that basically renders the plugin un-useable, is to disable the functionality when editing closing tags. I think we can all manage to modify opening tags when we want it replicated to the closing tags.

arctelix avatar Nov 01 '17 20:11 arctelix

Looks like PR #28 aims to alleviate this problem as well.

mikebronner avatar Nov 01 '17 21:11 mikebronner

self-closing tags are impossible

@arctelix Please elaborate. If you are finding that there are certain tags that you never want this package to operate on, add them to ignoredTags config.

Disabling end tag sync has been added to v1.1.0.

dsandstrom avatar Nov 03 '17 23:11 dsandstrom

v1.1.0 Seems to have fixed the issue. Thanks!

In the future, it would be great if double tag could differentiate between modifying a closing tag (causing the opening tag to change) and deleting a closing tag (causing the opening tag to become self-closing). That should eliminate the need for the configuration and satisfy all use cases ( i think ).

arctelix avatar Nov 04 '17 14:11 arctelix

This bug is now hitting me in vim-mode. When I remove the line that has the closing tag on it, the opening tag's text gets removed. Furthermore, undo doesn't add the text back.

dsandstrom avatar Jan 24 '18 03:01 dsandstrom