-
Notifications
You must be signed in to change notification settings - Fork 119
'identifier expected' error when using a string template followed by a pseudo-element selectorΒ #440
Description
Describe the bug (including copyable syntax)
When writing a styled component with a string template, if you use a template for the identifier (a) followed by a pseudo selector (:after) it results in an error .${a}:after {
Screenshot
Screenshots are alway useful!

To Reproduce
const test = ''
const StyledDiv = styled.div`
.${test}:before { // <- identifier expected (ts-styled-plugin(9999))
border-bottom: none;
transition: none;
}
`Expected behavior
No error as this is a valid identifier
Build environment (please complete the following information):
- OS:
Mac OS 14.1.2 - VSCode Version:
1.85.0 - Extension Version:
1.7.8
Extensions
code --list-extensions
DavidAnson.vscode-markdownlint
dbaeumer.vscode-eslint
eamodio.gitlens
EditorConfig.EditorConfig
esbenp.prettier-vscode
firsttris.vscode-jest-runner
github.vscode-github-actions
GitHub.vscode-pull-request-github
ms-azuretools.vscode-docker
ms-python.python
ms-python.vscode-pylance
ms-vscode-remote.remote-containers
ms-vscode-remote.remote-ssh
ms-vscode-remote.remote-ssh-edit
ms-vscode.cmake-tools
ms-vscode.cpptools
ms-vscode.cpptools-extension-pack
ms-vscode.cpptools-themes
ms-vscode.live-server
ms-vscode.remote-explorer
PKief.material-icon-theme
redhat.java
rust-lang.rust-analyzer
ryanluker.vscode-coverage-gutters
SonarSource.sonarlint-vscode
streetsidesoftware.code-spell-checker
styled-components.vscode-styled-components
tamasfe.even-better-toml
twxs.cmake
VisualStudioExptTeam.intellicode-api-usage-examples
VisualStudioExptTeam.vscodeintellicode
vscjava.vscode-java-debug
vscjava.vscode-java-dependency
vscjava.vscode-java-pack
vscjava.vscode-java-test
vscjava.vscode-maven
yoavbls.pretty-ts-errors
ZixuanChen.vitest-explorer