Skip to content
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

Emmet 2.0: "Wrap with Abbreviation" messes up formatting #29283

Closed
smlombardi opened this issue Jun 22, 2017 · 6 comments
Closed

Emmet 2.0: "Wrap with Abbreviation" messes up formatting #29283

smlombardi opened this issue Jun 22, 2017 · 6 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug emmet Emmet related issues verified Verification succeeded
Milestone

Comments

@smlombardi
Copy link

  • VSCode Version: Code - Insiders 1.14.0-insider (d5e10a5, 2017-06-22T05:33:25.311Z)
  • OS Version: Darwin x64 16.6.0
  • Extensions:
Extension Author (truncated) Version
ng-template Ang 0.1.3
vscode-markdownlint Dav 0.9.1
code-settings-sync Sha 2.8.1
sort-lines Tyr 1.3.0
Bookmarks ale 0.15.2
project-manager ale 0.18.1
path-intellisense chr 1.4.2
vscode-eslint dba 1.2.11
vscode-html-css ecm 0.1.7
tslint eg2 0.15.0
auto-rename-tag for 0.0.14
Angular2 joh 2.3.3
HTMLHint mka 0.3.3
vscode-stylefmt mrm 2.4.1
angular2-inline nat 0.0.17
stylelint shi 0.25.0
ayu tea 0.4.0
change-case wma 1.0.0

(4 theme extensions excluded)


Steps to Reproduce:

  1. Select a block of HTML
  2. Invoke "emmet: wrap with abbreviation" command
  3. enter div

In older Emmet, the block would be left alone and wrapped with a <div></div> but now this happens:

jun-22-2017 14-38-52

@vscodebot vscodebot bot added the insiders label Jun 22, 2017
@vscodebot vscodebot bot added bug Issue identified by VS Code Team member as probable bug emmet Emmet related issues labels Jun 22, 2017
@jens1o
Copy link
Contributor

jens1o commented Jun 22, 2017

maybe related to #27977?

@ramya-rao-a
Copy link
Contributor

Not related to #27977 That one is about Update Image Size which I havent implemented in the new emmet yet.

@ramya-rao-a ramya-rao-a added this to the June 2017 milestone Jun 22, 2017
@ramya-rao-a
Copy link
Contributor

ramya-rao-a commented Jun 23, 2017

With 7358946 there will now be newlines before and after the selected text.

This solves half the formatting problem.

wrap

I'll keep working on it to improve it further

@ramya-rao-a
Copy link
Contributor

@smlombardi @jens1o This should now be fixed completely. Try it out in Monday's Insiders build.

Thanks for reporting @smlombardi !

@ramya-rao-a
Copy link
Contributor

Note to verifier:

  • Try with empty selection. Current line should be wrapped with given abbreviation
  • Try nested abbreviations
  • Try with multiple lines selected

@roblourens
Copy link
Member

roblourens commented Jun 29, 2017

Slightly inconsistent with abbreviations that expand to multiple elements. Not sure it's a problem though.

e.g. Have empty selection, "wrap with abbreviation", div*3, result is

<div></div>
<div></div>
<div>
  
</div>

with cursor in the top div.

@roblourens roblourens added the verified Verification succeeded label Jun 29, 2017
@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 17, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug emmet Emmet related issues verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

4 participants