Reputation: 367
I am using sublime text for react.js development and everything is fine but the syntax highlighting for the inline code inside html files as shown in line number 18.
note that syntax highlighting works fine within example.js that was wired up in line number 16
Upvotes: 4
Views: 3926
Reputation: 10752
You need to select Javascript (Babel) for the language in the bottom right corner:
Upvotes: 15
Reputation: 281626
It doesn't work because in sublime your syntax highlighting is set to HTML
. See bottom right corner in you sublime. In your js
file it would have been set to jsx
and that's why it worked correctly there. This answer on Stackoverflow explains how you can achieve it in Sublime Text 2.
You can also visit and look at Sublime text 3 documentation for syntax here
I suppose these will help you and I could explain the problem to you.
Upvotes: 6