Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

CSS grammar not injected for custom styled-components #634

Closed
1 task done
edahlseng opened this issue Jan 15, 2019 · 1 comment · Fixed by #639
Closed
1 task done

CSS grammar not injected for custom styled-components #634

edahlseng opened this issue Jan 15, 2019 · 1 comment · Fixed by #639

Comments

@edahlseng
Copy link

Prerequisites

Description

The CSS grammar is not properly injected for styled-components using custom components.

Steps to Reproduce

The following correctly syntax highlights:

const TestComponent = styled.div`
	h1 {
		color: green;
	}
`;

image

The following does not correctly syntax highlight:

const TestComponent = styled(UnstyledComponent)`
	h1 {
		color: green;
	}
`;

image

Versions

$ atom --version
Atom    : 1.34.0
Electron: 2.0.16
Chrome  : 61.0.3163.100
Node    : 8.9.3

$ apm --version
apm  2.1.3
npm  6.2.0
node 8.9.3 x64
atom 1.34.0
python 2.7.15
git 2.20.1
@rsese
Copy link

rsese commented Jan 17, 2019

Thanks @edahlseng - confirmed on macOS 10.12.6 with 1.34.0:

correct

incorrect

daviwil added a commit that referenced this issue Feb 7, 2019
This change fixes #634 which reports that the Tree-Sitter JavaScript grammar
does not correctly highlight tagged template injections which have function
parameters, such as those used in the Styled Components library.  The fix
enables tagged template injections to be highlighted correctly when the template
invocation includes function arguments.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants