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

Support for unified diff #769

Closed
trombonehero opened this issue Sep 14, 2015 · 1 comment
Closed

Support for unified diff #769

trombonehero opened this issue Sep 14, 2015 · 1 comment

Comments

@trombonehero
Copy link

I don't see an option for unified diff formatting on http://prismjs.com/download.html... this would be a very handy language to implement. It seems like this might be a pretty easy change? I don't know the Prism API well, but I suspect that half of the change would look like:

Prism.languages.diff = {
    'addition': /+.*/,
    'deletion': /-.*/
}

but I'm not sure how to turn 'addition' and 'deletion' into appropriate class names... these aren't normal keywords, comments, etc. Does the Prism CSS have classes for things like addition and deletion?

@Golmote
Copy link
Contributor

Golmote commented Sep 14, 2015

Hi, thanks for reporting. It should be fixed now. Just use the git component for diffs.

Note that there is also a pending PR (#450) to make a proper component for diffs. It might be merged some day.

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