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

Highlight bytes / words in diffs on adjacent multi-line modifications. #235

cirosantilli opened this Issue Jul 19, 2014 · 1 comment


None yet
1 participant

cirosantilli commented Jul 19, 2014

When you modify a byte of a single line, it gets highlighted.

When you modify a byte on two adjacent lines, not.


screenshot from 2014-07-19 12 57 29 github diff highlight adjacent

Live at: cirosantilli/test-git-web-interface@b2eb608#diff-ecb7848c497d61fa37b0e0db1b7582d7

Note how E gets highlighted (darker), while K and N don't.

Should be technically feasible, since both Diffy (which GitLab uses for the diffs) and the diff-highlight contrib script do it. E.g.:

echo 'require "diffy"; puts"a b c\nd e f\n", "a B c\nd E f\n").to_s(:html)' | ruby


<div class="diff"> 
<li class="del"><del>a <strong>b</strong> c</del></li> 
<li class="del"><del>d <strong>e</strong> f</del></li> 
<li class="ins"><ins>a <strong>B</strong> c</ins></li> 
<li class="ins"><ins>d <strong>E</strong> f</ins></li> 

Same request for GitLab:


This comment has been minimized.


cirosantilli commented Sep 5, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment