Improve intraline diff highlighting in the changes view
Proposal
The highlighting of text diff in the changes view is lacking especially when it comes to normal text in for example latex or markdown. The usual approach in these text documents is that a line equals a paragraph and in order to visually parse changes in these documents the display of changes within a line needs to be improved.
Review of text and documentation is very common and this improvement can better the review experience for many developers.
To illustrate the issue I have attached screenshots of example text from the related issue and in comparison a screenshot of gerrit code review which does especially well in this regard.
Related Issue
This issue spawned off from discussion in #16950 (closed) which is about a new git --word-diff
like diff view.
In the comment #16950 (comment 214938220) an additional limitation of the current implementation is described.
Possible approches
- The output of
git diff --word-diff=porcelain
is supposed to be machine readable. - There is a git contrib module https://github.com/git/git/tree/master/contrib/diff-highlight
- There is https://www.gnu.org/software/wdiff/
All of these are open sourced and might be candidates for an implementation approach.