Open rattrayalex-stripe opened 7 years ago
This seems to be the case even with this plugin disabled. Can you please confirm?
@joshpeng sorry for the delay.
The default VSCode syntax highlighter also doesn't handle this correctly, if that's what you mean. Other highlighters like vim (and, it seems, github's) don't seem to break, though.
Specifically, I'm told this syntax works with the following vim plugins:
Plugin 'pangloss/vim-javascript'
Plugin 'flowtype/vim-flow'
@rattrayalex-stripe This seems to happen both with or without Sublime Babel enabled. The issue is <Foo>
because it detects that as a React HTML tag. Not sure what can be done.
Yeah, it's also an issue "upstream" with https://github.com/babel/babel-sublime and judging from the current status of that repo (https://github.com/babel/babel-sublime/issues/328 and https://github.com/babel/babel-sublime/issues/293) it's not likely to be addressed soon.
It may be possible to go digging in regex's and do something clever (eg; handle a <Foo>(
differently from <Foo>
) but I certainly understand if you're not up for that 😄
@joshpeng Have you looked at https://github.com/borela/naomi?
This code results in broken syntax highlighting for all following code in the file:
I have found that this workaround fixes it:
But would rather not have to litter my codebase with otherwise-needless comments 😄