-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
[Feature Request] Diff and Language Highlights #2704
Comments
I download prism's theme .css file to /**
* Custom Styles here.
*
* ref:https://v1.vuepress.vuejs.org/config/#index-styl
*/
.home .hero img
max-width 450px!important
@import "/themes/prism-darcula.css" It works. |
@ZinkLu Could you share the code you used in markdown as well? I'm expecting a result like this where both the diff and js is highlighted:
|
sorry, I misunderstood your meaning and it's seems there is no way to use a diff highlighting with specify language. |
This would probably need an addition to the opening code fence. I suggest
For highlighting lines, which should parse, though maybe not be useful:
|
@loren138 Did you end up working on this? |
@Ishadijcks The PR template suggests waiting for feature request approval before working on the code.
Since this hasn't been labeled as approved, I haven't worked on it. I do have some time in the next week or two that I could code it, assuming a maintainer approves it. |
This repo isn't actively maintained anymore, so it might be better to submit this as an issue for Vuepress2? |
I want it for vitepress :) |
I think this is a reasonable feature request and should be introduced to 1.x. |
Feature request
I'd like to be able to use diff and language highlighting as provided by this official prism extension: https://prismjs.com/plugins/diff-highlight/
There was a recent PR which improved Prisms auto-loader so it properly recognizes the diff syntax which might be helpful in implementing this: https://github.com/PrismJS/prism/pull/2580/files
What problem does this feature solve?
Diffs can have diff and language specific highlighting
What does the proposed API look like?
Just like the prism docs I can use
diff-javascript
as the language to get diff syntax and javascript syntax highlighted.I can also use
diff-javascript diff-highlight
to get full line highlights and javascript highlighted.How should this be implemented in your opinion?
Official support using the already coded prism plugin.
Are you willing to work on this yourself?
Yes
The text was updated successfully, but these errors were encountered: