-
Notifications
You must be signed in to change notification settings - Fork 29.3k
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
How to get Emmet to generate a custom JSX attribute without quotes #63703
Comments
(Experimental duplicate detection) |
@sergeche Are you aware of any customization that allows not having the quotes around the attribute value at all? |
Yes, you can add additional check for React attributes here: https://github.com/emmetio/markup-formatters/blob/master/format/html.js#L232 The React attribute object contains |
Thanks @sergeche! If anyone is interested in picking this up, please submit a PR in the https://github.com/emmetio/markup-formatters repo |
@ramya-rao-a , I would like to pick this up. |
@ramya-rao-a i have made a PR emmetio/markup-formatters#2 |
Available as |
Thanks @sergeche! Just waiting for a newer version of the https://github.com/emmetio/abbreviation module, and then we should be able to pull in all the upstream fixes. |
@octref All that is left to do is to update vscode-emmet-helper module to consume the latest versions of the |
@ramya-rao-a OK, will pick it up for December. |
@octref I have updated the Updating We are currently using v0.5.10 of the expand-abbreviation module which is not compatible with the v0.4.0 version of the markup-formatter. We have 2 choices here:
For short-term I would recommend the first option. |
This is not fixed yet. Moving to Feb. |
Is this going be back in one of the next sprints? |
currently the Is there a way to get the intended behavior? Thanks |
Is there anyone working on this? |
Any update on this? |
Hello? |
Bump |
2 similar comments
Bump |
Bump |
Sadly, I was unable to contact anyone at VSCode team to help me and support/sponsor new plugin development. |
Is this functionality available in an extension? Since there's not a whole ton of feedback from the team |
@icorbrey it’s available in core Emmet module. There’s a draft PR with upgrade to recent Emmet v2, which seems to be abandoned: microsoft/vscode-emmet-helper#33 |
\closedWith dc5a3da |
By default, when I expand an html tag with an attribute, the attribute's value gets surrounded by quotes.
I'm trying to remove the quotes generated by Emmet around the props.onClick value for custom attribute onClick.
My input (then TAB to expand):
button[onClick={props.onClick}]
Emmet's output:
<button onClick="props.onClick"></button>
What I expect (props... WITHOUT quotes):
<button onClick={props.onClick}></button>
Whereas, I want to have to specify when the expanded version wrapping with quotes.
Either rapping it around double brackets doesn't work. Is that possible with vscode.emmet?
The text was updated successfully, but these errors were encountered: