vscode-styled-components icon indicating copy to clipboard operation
vscode-styled-components copied to clipboard

Broken highlight when using a multiline prop typing in Typescript

Open BraisC opened this issue 3 years ago • 5 comments

Describe the bug (including copyable syntax) When declaring a styled component in Typescript with an inline multiline prop typing, it breaks the syntax highlight for the code after that.

Screenshot Wrong

Captura de pantalla 2022-02-10 a las 12 44 18 Good

Captura de pantalla 2022-02-10 a las 12 44 56

Syntax Token used in the wrong case

Captura de pantalla 2022-02-10 a las 12 47 05

To Reproduce Declare an styled component with a multiline prop typing and declare any other variable below

const Container = styled.div<{
  fullWidth?: boolean;
  isMyMessage?: boolean | null;
  displayActorImage: boolean;
}>`
  display: flex;
`;

const x = 3;

Expected behavior Expected to highlight the rest of the code correctly

Build environment (please complete the following information):

  • OS: macOS Monterey
  • VSCode Version: 1.64.1
  • Extension Version: v1.7.2

Additional context Disabling the extension fixed the problem so I suppose it is it what is causing the issue.

BraisC avatar Feb 10 '22 11:02 BraisC

I have the same bug

evgen-kent avatar Jun 06 '22 09:06 evgen-kent

Ditto

hughgardiner avatar Jul 26 '22 20:07 hughgardiner

Same bug

marcfrankel avatar Aug 23 '22 14:08 marcfrankel

When styled components are declared at the top of a file, this can be quite frustrating as highlighting for all code below it are broken

louis-cf-lin avatar Nov 21 '22 12:11 louis-cf-lin

Same bug

GalDayan avatar Dec 28 '23 12:12 GalDayan