-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BUG: VSCode autoclose for HTML causing wrap to occur twice #1
Comments
From @dimkir on September 12, 2017 11:38 |
From @bennyschaefer on September 22, 2017 11:8 htmltagwrap hasn't seen an update in about a year. I doubt we'll see a fix for this. But I did some testing and came up with this solution that works: VSCode can do htmltagwrap without the extension. Here's how:
There you go. The only difference is that you get to enter the desired tag instead of automatically getting a p-tag. PS: I know this doesn't really contribute to a bugfix, but since there hasn't been any work on this extension in a while, and I really grew fond of its functionality (as did others), I felt comfortable sharing this workaround here in case anyone else misses the ease of adding tags to a selection. PPS: I'm aware this kinda misuses the emmet wrap feature, but it still works. Definitely better than having to remove an auto-closed tag each time. |
This bug is the result of a breaking change from the autoclose feature discussed in microsoft/vscode#2246 (comment). I'm looking into fixing this (and also on accepting the pull requests that have been sitting here for a while). Apologies for the neglect to this extension. I want to fix it up and deliver on the top requests. Thanks for your patience! |
In the meantime, a workaround is using the setting
which will prevent the duplicate tag. |
From @dreadsoul on October 3, 2017 13:13 I have also the same problem and think the following details will be useful: Note: If I select more then 1 line the problem does not occur! |
@GitLiamuk this should be fixed now. It was an issue with an emmet feature that was enabled by default in a recent VS Code release. I've updated the way htmltagwrap does its thing so that it doesn't trigger emmet to do duplicate work. |
From @GitLiamuk on September 8, 2017 9:2
VSCode version: 1.16.0 adds a html autoclose feature.
This feature causes this extension to wrap the selected text prematurely, resulting in faulty markup.
Copied from original issue: microsoft/vscode-htmltagwrap#15
The text was updated successfully, but these errors were encountered: