borela / naomi

Sublime Text enhanced syntax highlighting for JavaScript ES6/ES7/ES2015/ES2016/ES2017+, Babel, FlowType, React JSX, Styled Components, HTML5, SCSS3, PHP 7, phpDoc, PHPUnit, MQL4. Basic: Git config files.
Other
557 stars 20 forks source link

[critical][styled-components] bug with withComponent #238

Open kud opened 4 years ago

kud commented 4 years ago
import BaseTitle from "./Base/Title"
import Line from "./Line"

const Root = styled.div`
  margin: 2rem 0;
`

const Title = styled.div``

// Title.Link = styled.a`
Title.Link = styled(BaseTitle.withComponent("div"))`
`

const Separator = styled.div`
  margin-top: 1rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid #e0e0e0;
`

const Content = styled.div``
image
kud commented 4 years ago

@borela Could you guide me about that? I'd love to fix it by myself as I find it critical for me. :)

kud commented 4 years ago

Related: https://forum.sublimetext.com/t/syntax-on-styled-components/47338

AlexKvazos commented 4 years ago

I'd also want to try and fix this

AlexKvazos commented 4 years ago

Looks like it should be at this file https://github.com/borela/naomi/blob/master/syntaxes/fjsx15/literal/string/styled-component.sublime-syntax