-
Notifications
You must be signed in to change notification settings - Fork 17
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
CSS tagged template literals don't self close #36
Comments
Can confirm, I though it was the styled components extension, but after messing around with extensions a bit more, the problem is with vscode-language-babel. e.g. - When you type in the templet literal quote marks, it adds 1 but doesn't seem to recognise it, and then when you try and complete it, vscode adds one more at the end, so you end up with 3 VSCode: 1.27.2 package.json -
VSCode settings: {
"terminal.integrated.shell.osx": "/bin/zsh",
"terminal.integrated.fontFamily": "Roboto mono for Powerline",
"workbench.iconTheme": "vscode-icons",
"editor.renderIndentGuides": false,
"guides.enabled": false,
"gitlens.keymap": "alternate",
"gitlens.advanced.messages": {
"suppressShowKeyBindingsNotice": true
},
"window.zoomLevel": 1,
"editor.formatOnSave": true,
"[javascript]": {
"editor.formatOnSave": false
},
"eslint.autoFixOnSave": true,
"eslint.alwaysShowStatus": true,
"editor.minimap.enabled": false,
"window.title": " ",
"emeraldwalk.runonsave": {
"commands": [
{
"match": "\\.php$",
"cmd": "prettier ${file} --write"
}
]
}
}
|
Sorry for the delay, I've been away for the past couple of weeks. I will hopefully be able to take a look this weekend. |
This appears to be an issue in VSCode itself. I'll keep track of this and update accordingly. |
I haven't tried this myself, but it seems that setting |
Closing this since there is a decent workaround and vscode's fix should suffice. |
Before VS Code v1.27, the following would happen when creating a CSS tagged template literal (note that this issue happens with styled components, or any tagged template literal function name that triggers CSS highlighting):
Now, this is what happens:
I can confirm that this does not happen with any other names, for example this still works:
I'm not sure where to file this issue, I would think that it's related to the CSS language detection part of the plugin, but I can confirm that it only happens with CSS-highlighted tagged template literals, and also only when this plugin is enabled.
The text was updated successfully, but these errors were encountered: