styled-components / vim-styled-components

Vim bundle for http://styled-components.com based javascript files.
304 stars 24 forks source link

Function within the template literal #12

Closed puradox closed 7 years ago

puradox commented 7 years ago

I don't believe the syntax is being highlighted correctly when functions are introduced to the template literal. Especially the last curly brace on Line 6 in the screenshot below. It sticks out like a sore thumb to me.

func

fleischie commented 7 years ago

Yes, this is especially annoying on such cases as:

  const customColor = '#123456';

  const Header = styled.h2`
    border: ${props => props.highlight ? 'none' : `1px solid ${customColor}`};
  `;

I don't have a screenshot handy, but the outermost } get's highlighted as unclosed bracket. I suggest I investigate, whether a SCSS plugin or it's algorithm might fix this issue.