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

Some syntax causes broken highlight. #4

Open
iFwu opened this issue Dec 12, 2017 · 10 comments
Open

Some syntax causes broken highlight. #4

iFwu opened this issue Dec 12, 2017 · 10 comments

Comments

@iFwu
Copy link
Owner

iFwu commented Dec 12, 2017

70ceb97e-e127-4824-a688-e2ebf3ef6055

@victordidenko
Copy link

+1 same for me

@kennedyrose
Copy link

Same here. I think it's the |css in this line but I don't know how to test VS extensions.

@athrunsun
Copy link

@kennedyrose That's the same reason why this extension doesn't work with TypeScript, where we write styled jsx like this:

<style jsx={true}>{...}</style>

CC: @iFwu

iFwu added a commit that referenced this issue Sep 7, 2018
@iFwu
Copy link
Owner Author

iFwu commented Sep 7, 2018

fixed

@iFwu iFwu closed this as completed Sep 7, 2018
@readeral
Copy link

Still experiencing this issue ("css`" causing all following code to be unhighlighted) with v1.0.0 installed in vs code on macOS Mojave. Have confirmed the version by running 'code --list-extensions --show-versions" in terminal, and it reports back "vscode-styled-jsx@1.0.0"

Example screenshot attached

screen shot 2018-10-22 at 9 06 59 pm

@iFwu iFwu reopened this Oct 26, 2018
@readeral
Copy link

Thanks iFwu. Anything I can do to help let me know, but haven’t had a chance to dig into the source to determine the issue, sorry!

@iFwu
Copy link
Owner Author

iFwu commented Oct 26, 2018

@readeral The css`flex: 1;` doesn't match the external styles rule in the styled-jsx. That's why the syntax highlight is broken.

Is the css here use styled-components? I see the syntax of styled-components is something like this.
Maybe you can disable the extension in the workspace that use styled-components syntax.

@readeral
Copy link

readeral commented Oct 26, 2018 via email

@karlhorky
Copy link

karlhorky commented Jun 19, 2020

Confirmed that this extension breaks vscode-styled-components with Emotion and styled-components code.

This only started happening for me on the May 2020 version of VS Code (version 1.46).

Kapture 2020-06-19 at 14 50 36

See also:

@tettoffensive
Copy link

@karlhorky This is happening to me as well. I just disabled vscode-styled-jsx for now, since I'm mainly using emotion and twin.macro (for tailwind)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants