-
-
Notifications
You must be signed in to change notification settings - Fork 32
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
How do I add support for typescript syntax highlighting? #19
Comments
https://prismjs.com/#languages-list Language examples are documented here for Markdown, Liquid, and Nunjucks: https://www.11ty.dev/docs/plugins/syntaxhighlight/#markdown-highlighter Most of the examples use |
The problem is, that ts is not instanciated per default (only markup, javascript and clike are). So, when I try to add it as per the documentation, and use it but using ts rather than js in my code fences , I get errors:
|
Okay, so I changed it to say typescript rather than ts, and it worked. I'm not sure this is a bug with Prism (that lists both ts and typescript as supported) or the plugin. Sorry for taking up time, but this might help someone else in the future perhaps! Thanks for the really fast feedback, by the way! ❤️ |
Ah hmm, I believe you did uncover a bug here. I don’t think aliases are quite resolving correctly with the Prism loader Related: |
Pushed a fix to this, it’ll go up with 3.0.1 |
So, I really do not get how I am supposed to extend the languages Prism can highlight. Where and how do I add say typescript if I want it to be able to highlight that?
The text was updated successfully, but these errors were encountered: