sublime-jsx icon indicating copy to clipboard operation
sublime-jsx copied to clipboard

Wrong syntax highlighting

Open pioz opened this issue 7 years ago • 5 comments

Here a screenshot:

screen

pioz avatar Feb 14 '18 07:02 pioz

Happens on template literals too screen shot 2018-02-20 at 11 23 14 am

sethomas avatar Feb 20 '18 17:02 sethomas

I found errors in inside strings too, when I add two /, act like a comment, e.g.

screen shot 2018-06-14 at 17 36 10

without //

screen shot 2018-06-14 at 17 36 24

darlanmendonca avatar Jun 14 '18 20:06 darlanmendonca

Thanks, that last one is the same issue as #1. I do not have a lot of time to devote to this project, but I would gladly accept pull requests to fix these.

ccampbell avatar Jun 14 '18 21:06 ccampbell

The last two comments had to do with template literals. Those should be fixed. @pioz I believe your issue is still valid. Also one minor annoyance that I have to figure out.

Doing this will not highlight correctly

return (
    <div>
        whatever
    </div>
);

But this is fine

return 
    <div>
        whatever
    </div>;

And so is this

return (<div>
    whatever
</div>);

ccampbell avatar Jun 14 '18 23:06 ccampbell

@ccampbell Your first example seem good, with the current version :

image

A-312 avatar May 12 '20 04:05 A-312