-
-
Notifications
You must be signed in to change notification settings - Fork 409
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Code colors in script tags are not visible #2169
Comments
I want to make an addition. I found the cause of the problem. But I couldn't figure out exactly why. Coloring disappears if there is SVG code in "template". Example; <template>
<svg viewBox="0 0 24 24" class="h-6 w-6 fill-zinc-500 transition group-hover:fill-zinc-600 dark:fill-zinc-400 dark:group-hover:fill-zinc-300">
<path d="M18.335 18.339H15.67v-4.177c0-.996-.02-2.278-1.39-2.278-1.389 0-1.601 1.084-1.601 2.205v4.25h-2.666V9.75h2.56v1.17h.035c.358-.674 1.228-1.387 2.528-1.387 2.7 0 3.2 1.778 3.2 4.091v4.715zM7.003 8.575a1.546 1.546 0 01-1.548-1.549 1.548 1.548 0 111.547 1.549zm1.336 9.764H5.666V9.75H8.34v8.589zM19.67 3H4.329C3.593 3 3 3.58 3 4.297v15.406C3 20.42 3.594 21 4.328 21h15.338C20.4 21 21 20.42 21 19.703V4.297C21 3.58 20.4 3 19.666 3h.003z"></path>
</svg>
</template> |
Can't confirm due to missing repro case, but it seems a same problem to #192. |
Yes, that's exactly the problem. There is a problem closing the "svg" tag in the case mentioned for #192. All script coloring is lost because the ">" is shifted to a bottom line.
Additional Question; |
This is not VSCode's issue, it's textmate/html.tmbundle#101, but no update. :p |
So, do you have any workarounds for this situation? Or do we have to use it like this? :) |
I think you're using Prettier, you can check if Prettier has a rule option for this case. Or you can change your formatter, I personally prefer Volar + https://github.com/johnsoncodehk/volar-plugins/tree/master/packages/prettyhtml. |
Thank you for your interest. I changed the formatter as you said and the problem was solved. I appreciate the effort you put into Volar. I wish you good work. |
Hello, I am developing a website using Vue 3 with Volar. But there is a problem. Whenever I start to write code in "template", the colors in the script disappear.
But I don't have such a problem when I don't write any html code in the "template" or when it has empty content in general.
What is the reason of this? Why am I facing such a situation?
The text was updated successfully, but these errors were encountered: