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: "Wrap with Abbreviation" should wrap the complete tag element #41516

Closed
zzJinux opened this issue Jan 12, 2018 · 3 comments
Closed

Emmet: "Wrap with Abbreviation" should wrap the complete tag element #41516

zzJinux opened this issue Jan 12, 2018 · 3 comments
Assignees
Labels
emmet Emmet related issues feature-request Request for new features or functionality help wanted Issues identified as good community contribution opportunities verification-needed Verification of issue is requested verified Verification succeeded
Milestone

Comments

@zzJinux
Copy link

zzJinux commented Jan 12, 2018

  • VSCode Version: 1.19.1
  • OS Version: Windows 10 1703

Steps to Reproduce:

  1. Put a cursor on opening div tag. (start, end or middle of the line):
<div>
  foo
</div>
  1. Execute "Wrap with Abbreviation"

  2. Only opening div tag, <div> is wrapped, not the entire <div> node.
    This is not the same output compared to https://docs.emmet.io/actions/wrap-with-abbreviation/

  • Additional Note
    The command works fine with: <div>foo</div> (single line node)

Does this issue occur when all extensions are disabled?: Yes

@vscodebot vscodebot bot added the emmet Emmet related issues label Jan 12, 2018
@ramya-rao-a ramya-rao-a changed the title Emmet: "Wrap with Abbreviation" malfunctions Emmet: "Wrap with Abbreviation" should wrap the complete tag element Jan 12, 2018
@ramya-rao-a
Copy link
Contributor

ramya-rao-a commented Jan 12, 2018

Looks like when there is a selection, only the selected text should be wrapped.
When there is no selection, the current node should be wrapped.

PRs are welcome to fix this.
The place to add the fix is https://github.com/Microsoft/vscode/blob/1.19.2/extensions/emmet/src/abbreviationActions.ts#L41
To get the current node, refer https://github.com/Microsoft/vscode/blob/1.19.2/extensions/emmet/src/abbreviationActions.ts#L183

@ramya-rao-a ramya-rao-a added help wanted Issues identified as good community contribution opportunities feature-request Request for new features or functionality labels Jan 12, 2018
@ramya-rao-a ramya-rao-a added this to the Backlog milestone Jan 12, 2018
@pfongkye
Copy link
Contributor

Hi @ramya-rao-a I opened PR #41602 ready for review.

@ramya-rao-a ramya-rao-a modified the milestones: Backlog, January 2018 Jan 15, 2018
@ramya-rao-a
Copy link
Contributor

Thanks @pfongkye!

@ramya-rao-a ramya-rao-a added verification-needed Verification of issue is requested verified Verification succeeded labels Jan 29, 2018
@vscodebot vscodebot bot locked and limited conversation to collaborators Mar 1, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
emmet Emmet related issues feature-request Request for new features or functionality help wanted Issues identified as good community contribution opportunities verification-needed Verification of issue is requested verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

3 participants