-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Import Code Snippets: specify the language #1189
Labels
type: feature request
Request to add a new feature
Comments
I just had this same problem with a C# file. C# files usually end in .cs, if I do something like
What's rendered isn't highlighted. However, if you change the extension to the language name prism expects, i.e.
Then things worked for me. So, for now, you may have to name your files config.yaml and Makefile.makefile. That's... not great. It looks like
|
qdot
added a commit
to qdot/vuepress
that referenced
this issue
Jan 14, 2019
Add "lang:[prism-lang-name]" to code snippet insertion line, so name isn't dependant on file extension detection. Fixes vuejs#1191, vuejs#1189
qdot
added a commit
to qdot/vuepress
that referenced
this issue
Jan 14, 2019
Add "lang:[prism-lang-name]" to code snippet insertion line, so name isn't dependant on file extension detection. Fixes vuejs#1191, vuejs#1189
18 tasks
oskardudycz
added a commit
to kurrent-io/documentation
that referenced
this issue
Feb 15, 2021
oskardudycz
added a commit
to kurrent-io/documentation
that referenced
this issue
Feb 15, 2021
oskardudycz
added a commit
to kurrent-io/documentation
that referenced
this issue
Feb 15, 2021
oskardudycz
added a commit
to kurrent-io/documentation
that referenced
this issue
Feb 17, 2021
This was referenced Apr 14, 2021
This was referenced Apr 27, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://vuepress.vuejs.org/guide/markdown.html#import-code-snippets
I've got this block of code in Markdown file:
Both work but the code is not highlighted. How do I specify the language when I import a code snippet?
The text was updated successfully, but these errors were encountered: