-
Notifications
You must be signed in to change notification settings - Fork 3.2k
fix(docusaurus): support diff code blocks #4156 #4158
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
base: main
Are you sure you want to change the base?
fix(docusaurus): support diff code blocks #4156 #4158
Conversation
@soundproofboot is attempting to deploy a commit to the Ionic Team on Vercel. A member of the Team first needs to authorize it. |
…d, deleted class only for diff blocks
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! Nice fix. 🚀
@@ -324,7 +324,7 @@ module.exports = { | |||
prism: { | |||
theme: { plain: {}, styles: [] }, | |||
// https://github.com/FormidableLabs/prism-react-renderer/blob/e6d323332b0363a633407fabab47b608088e3a4d/packages/generate-prism-languages/index.ts#L9-L25 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's update this comment:
// https://github.com/FormidableLabs/prism-react-renderer/blob/e6d323332b0363a633407fabab47b608088e3a4d/packages/generate-prism-languages/index.ts#L9-L25 | |
// Prism provides a [default list of languages](https://github.com/FormidableLabs/prism-react-renderer/blob/e1c83a468b05df7f452b3ad7e4ae5ab874574d4e/packages/generate-prism-languages/index.ts#L9-L26). | |
// A list of [additional languages](https://prismjs.com/#supported-languages) that are supported can be found at their website. |
@@ -149,7 +148,8 @@ pre[class*='language-'] { | |||
.token.attr-value, | |||
.language-css .token.string, | |||
.style .token.string, | |||
.token.variable { | |||
.token.variable, | |||
.token.inserted { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's add a comment of what .token.inserted
does so it's easier for us to debug. There's a lot of old code in this repo that we're not sure what's needed or not. By providing comments like these, we can start to figure out what is important.
.token.inserted { | |
// Code additions (indicated by a leading '+') within a diff. | |
.token.inserted { |
Do the same for .token.deleted
:
// Code removals (indicated by a leading '-') within a diff.
.token.deleted {
resolves #4156
Changes
.token.inserted
selector to greenish #42b983 block after verifying.token.inserted
and.token.deleted
will only select lines in diff blocksScreenshot
Screenshot from docs/angular/build-options