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

Closed
cirosantilli opened this Issue Jul 19, 2014 · 1 comment

Comments

Projects
None yet
1 participant
@cirosantilli
Collaborator

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.

Example:

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 Diffy::Diff.new("a b c\nd e f\n", "a B c\nd E f\n").to_s(:html)' | ruby

produces:

<div class="diff"> 
<ul> 
<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> 
</ul> 
</div>

Same request for GitLab: http://feedback.gitlab.com/forums/176466-general/suggestions/6191324-highlight-bytes-words-in-diffs-on-adjacent-multi

@cirosantilli

This comment has been minimized.

Collaborator

cirosantilli commented Sep 5, 2014

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