Skip to content
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

deletion and insertion #51

Closed
Code-Victor opened this issue Aug 19, 2022 · 4 comments
Closed

deletion and insertion #51

Code-Victor opened this issue Aug 19, 2022 · 4 comments

Comments

@Code-Victor
Copy link
Contributor

is there a way to highlight lines that are deleted and lines that are removed?

@timlrx
Copy link
Owner

timlrx commented Aug 20, 2022

Yes, you can style the inserted lines by targeting .code-line.inserted and the deleted lines with .code-line.deleted. Currently, the inserted and deleted classes are only added if the language is diff (reference code).

@Code-Victor
Copy link
Contributor Author

alright, thanks.
I'm using MDX , is there any way to have js syntax highlight with a diff?

@timlrx
Copy link
Owner

timlrx commented Aug 20, 2022

Not at the moment because the package simply runs the list of language against https://github.com/wooorm/refractor. We could possibly detect diff:js as a language and run it through the diff parser, followed by the js parser to add the correct tokens. Happy to accept a PR on that.

@timlrx
Copy link
Owner

timlrx commented Aug 21, 2022

Added in #53 and published in v1.5.0. Thanks for the enhancement 👍

@timlrx timlrx closed this as completed Aug 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants