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 falsely suggesting completion with hyphen in parent tag #32263

Closed
johnlindquist opened this issue Aug 11, 2017 · 12 comments
Closed

Emmet falsely suggesting completion with hyphen in parent tag #32263

johnlindquist opened this issue Aug 11, 2017 · 12 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug emmet Emmet related issues upstream Issue identified as 'upstream' component related (exists outside of VS Code) verified Verification succeeded

Comments

@johnlindquist
Copy link

@vscodebot vscodebot bot added the emmet Emmet related issues label Aug 11, 2017
@zouhangwithsweet
Copy link

hi , i cannot use the emmet in .vue file after i updated the vccode today and i already has wirte "emmet.syntaxProfiles": {
"vue-html": "html",
"vue": "html"
} in setting json.

@ramya-rao-a
Copy link
Contributor

ramya-rao-a commented Aug 11, 2017

That's a valid bug, thanks @johnlindquist

@zouhangwithsweet You need to use emmet.includeLanguages setting instead from VS Code 1.15 version onwards. Check out the release notes or the emmet blog

@ramya-rao-a ramya-rao-a added the bug Issue identified by VS Code Team member as probable bug label Aug 11, 2017
@ramya-rao-a ramya-rao-a added this to the August 2017 milestone Aug 11, 2017
@zouhangwithsweet
Copy link

Thanks, its working now. But i cannot use tab to emmet code forever. That's too bad. its time to use enter now!!

@ramya-rao-a
Copy link
Contributor

@zouhangwithsweet You can use tab for emmet in the latest Insiders. Download it from https://code.visualstudio.com/insiders and set emmet.triggerExpansionOnTab to true.

@ramya-rao-a
Copy link
Contributor

@sergeche The same problem occurs in the atom plugin as well.

atomemmet

When providing <foo-bar>Hello</foo-bar> as input to the extract-abbreviation module with the pos right after Hello, the extracted abbreviation is foo-bar>Hello instead of just Hello

Where as if the same without the hyphen is provided, then the extracted abbreviation is indeed Hello.

I was able to narrow it down to https://github.com/emmetio/extract-abbreviation/blob/v0.1.2/lib/is-html.js#L122 where the definition of identifier is to contain either : or a alpha-numeric char.

- fails this test.

How do you suggest we tackle this?

@ramya-rao-a ramya-rao-a added the upstream Issue identified as 'upstream' component related (exists outside of VS Code) label Aug 11, 2017
@sergeche
Copy link

@ramya-rao-a this test should also include - as well. Published @emmetio/extract-abbreviation@0.1.3

@ramya-rao-a
Copy link
Contributor

ramya-rao-a commented Aug 14, 2017

Thanks @sergeche

@johnlindquist Am curious, is it common to write html with tag names that have - in this way?

@sergeche
Copy link

Yes, it’s very common, especially for Web Components

ramya-rao-a added a commit that referenced this issue Aug 14, 2017
@ramya-rao-a ramya-rao-a added the candidate Issue identified as probable candidate for fixing in the next release label Aug 15, 2017
@jens1o
Copy link
Contributor

jens1o commented Aug 15, 2017

Exploring on @sergeche:

Yes, it is. When you obey to the standard, tags with a hyphen are the only tags that can be introduced custom. So when you want to create a new tag for your maintenance message and you want to give it unique properties, you would have to call it <j1o-maintenance></j1o-maintenance> (j1o is an acronym for jens1o here)

@ramya-rao-a
Copy link
Contributor

Thanks @sergeche and @jens1o, I have added this issue to the July Recovery plan

ramya-rao-a added a commit that referenced this issue Aug 15, 2017
@ramya-rao-a
Copy link
Contributor

Fix is both in master and the release branch

@kieferrm kieferrm removed the candidate Issue identified as probable candidate for fixing in the next release label Aug 15, 2017
@chrmarti chrmarti added the verified Verification succeeded label Aug 16, 2017
@ramya-rao-a
Copy link
Contributor

VS Code 1.15.1 is released and it has the fix to this issue

@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 upstream Issue identified as 'upstream' component related (exists outside of VS Code) verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

7 participants