-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
directly using injection grammars not working with shiki lazy loading #4341
Comments
Hmm, weird, jinja-html grammar is there but it's not part of shikis' bundledLanguages 👀 |
I don't think injections are even supposed to be used directly. (https://github.com/shikijs/textmate-grammars-themes/blob/main/packages/tm-grammars/README.md#injections) Why not use just |
I've been using Is it possible to have some way of injecting the language that avoids going directly to creating |
The issue is it was never supposed to work. Those are internal languages. Only top-level languages are meant to be used directly. That's why if you visit https://shiki.style/ you will only see jinja. There is no jinja-html. It's recommended that you use import { defineConfig } from 'vitepress'
export default defineConfig({
markdown: {
async shikiSetup(highlighter) {
await highlighter.loadLanguage('jinja')
}
}
}) |
Thank you, it worked well. |
Describe the bug
Cannot render
jinja-html
:Reproduction
markdown:
Expected behavior
No warning.
System Info
Additional context
Use this config dose not work, but the warning disappeared:
Validations
The text was updated successfully, but these errors were encountered: