Closed matthamil closed 7 years ago
@matthamil Thanks for the report. Which color theme are you using?
@matthamil This was pretty nasty. I committed a potential fix to the arrow-implicit-return
branch. Can you please try it out locally on your end and provide feedback? To test, grab the sublime-babel.json
file and replace the current version in your VS Code extensions folder. You may need to restart VS Code afterwards.
Windows: %USERPROFILE%\.vscode\extensions\joshpeng.sublime-babel-vscode-0.2.3\syntaxes
Mac/Linux: ~/.vscode/extensions/joshpeng.sublime-babel-vscode-0.2.3/syntaxes
:tada: I think that fixed it
Aw crap. Just noticed it doesn't fully work when two or more tags are used.
@matthamil Did another commit. Can you please try again? Something like this should have all the tags highlighted the same color now. If you run across any other scenarios where this might be broken please let me know. Thanks.
org => <UserOrganizationItemContainer><Blah><zxclk>fdsa</zxclk></Blah></UserOrganizationItemContainer>
It works unless you nest the same type of element like so:
The first example is nesting 3 <div>
tags. The second example nests varied tags.
EDIT: and just to make sure it wasn't the parens around the p
parameter in the .map()
callback, here's the same line without the parens:
@matthamil Pushed another commit. Please try again. Thanks for all the testing help.
sublime-babel.json
Edit: Please hold. Saw something again.....
Sure thing, thanks for maintaining this project :tada:.
@matthamil One last time haha. I reverted the previous commit and put in another approach. Fingers crossed. The earlier issue was leaking tokens and messing up closing ) and } brackets.
From https://github.com/Microsoft/TypeScript-TmLanguage/issues/401
Steps to Reproduce:
.js
file, and write some JSX in it like so:Use an arrow function to implicitly return JSX.
Watch as the syntax highlighting below breaks.
This only breaks when the JSX is implicitly returned with the ES6 arrow function. If you wrap the JSX in parens, the syntax highlighting is not broken:
Using the arrow function and using an explicit return fixes the syntax highlighting as well: