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

Not using configured JS syntax inside <script> block

Open dsl101 opened this issue 4 years ago • 5 comments

The documentation suggests the <script> block will use whatever syntax is used for regular .js files, but I'm getting very different results in Vue SFC <script> vs plain .js files. My default syntax is JavaScript Next, and looks like this (correct):

image

but that code in a Vue SFC looks like this (many things miscoloured):

image

There are lots of other differences too, and I can get the effect in plain .js files by switching to the built-in Javascript syntax (which is the reason I moved to JS Next). So, is there a way to be explicit about which syntax to use, or is there just a bug not picking up the configured .js syntax setting?

dsl101 avatar Feb 03 '20 21:02 dsl101