Skip to content
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

fix: vue template syntax bug #503 #543

Closed
wants to merge 1 commit into from
Closed

Conversation

nova1751
Copy link

This bug is caused by fact that the vue.tmLanguage.json in Volar repo doesn't support Vue directives and interpolations,the Volar uses Injections instead.The PR use vue-html syntax to render the code in tag template to fix the bug.

  • the original:
    Snipaste_2023-11-28_20-27-18
  • use vue-html
    Snipaste_2023-11-28_20-29-05

Copy link

netlify bot commented Nov 28, 2023

Deploy Preview for shiki-matsu failed.

Name Link
🔨 Latest commit c9dc4ef
🔍 Latest deploy log https://app.netlify.com/sites/shiki-matsu/deploys/6565dd42b1c5f500089e5ae0

@antfu
Copy link
Member

antfu commented Dec 19, 2023

The grammar is automatically fetched from upstream, so changing them will not fix it. Instead it's that Shiki is currently lacking for the injection support, which I fixed implemented it in Shikiji: antfu/shikiji#48

@nova1751
Copy link
Author

The grammar is automatically fetched from upstream, so changing them will not fix it. Instead it's that Shiki is currently lacking for the injection support, which I fixed implemented it in Shikiji: antfu/shikiji#48

Well,I get it.I fixed this thing by replacing the normal html's rendering logic with the vue-html's which could make elements render correctly in tag template.It works without injections actually,though it might be a bit weird to change the files fetched automatically.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Vue directives and interpolation highlighting does not work
2 participants