vue-syntax-highlight icon indicating copy to clipboard operation
vue-syntax-highlight copied to clipboard

Vue Component script tag not highlighting properly

Open dshcheung opened this issue 6 years ago • 1 comments
trafficstars

Screen Shot 2019-10-18 at 3 47 09 PM

on the left is Vue Component Syntax (*.vue) on the right is Javascript (Babel) Syntax (*.jsx)

for some reason when its <script></script> in *.vue , the syntax doesn't display the same as in *.jsx files

is there a setting i am missing something?

dshcheung avatar Oct 18 '19 08:10 dshcheung

I think the .vue extension is meant to be used with Single File Components, not pure jsx. It even says so in the readme for this project:

Sublime Text Syntax highlighting for single-file Vue.js components (enabled by vue-loader or vueify).

Furthermore, I'm not sure what you expect it to highlight differently from the babel syntax when used like this, as Vue script syntax is just regular js with a couple of known lifecycles in the root exported object.

abjugard avatar Nov 08 '19 15:11 abjugard