Improved support for word-diff highlighting
<!-- triage-serverless v3 PLEASE DO NOT REMOVE THIS SECTION --> *This page may contain information related to upcoming products, features and functionality. It is important to note that the information presented is for informational purposes only, so please do not rely on the information for purchasing or planning purposes. Just like with all projects, the items mentioned on the page are subject to change or delay, and the development, release, and timing of any products, features, or functionality remain at the sole discretion of GitLab Inc.* <!-- triage-serverless v3 PLEASE DO NOT REMOVE THIS SECTION --> ### Description When working with markdown (or any type of prose/text in general), the "classic" git-diff (intended for code) is of limited use. In the below example we can see how making a couple of changes is hard to track as the entire paragraph is shown twice ![Attachment-1-line-by-line-diff](https://gitlab.com/gitlab-org/gitlab/uploads/4c93a1609d6d47d4cd7dc3adf4465919/Attachment-1-line-by-line-diff.png) Conversely, in the below example we can see how much more efficiently changes are shown using word-diff ![Attachment-2-word-diff](https://gitlab.com/gitlab-org/gitlab/uploads/5efa282d4ed7435c0d27359067667c6c/Attachment-2-word-diff.png) ### Proposal Since git natively offers a `--word-diff` for these cases, users should have a mechanism to toggle this mode. Add an additional button `Word-dff` to the Inline/Side-by-side split button ![image](https://gitlab.com/gitlab-org/gitlab/uploads/b370c4ef0016afa0ef8daac70cab4261/image.png) ### Additional points / References / Links It might be worthwhile considering to word-diff certain file extensions, such as `.md`, `.txt` etc. by default. Classic Line-by-line code diff most likely is also the root cause behind this issue: https://gitlab.com/gitlab-org/gitlab/-/issues/16713 <details> <summary>Previous description</summary> Word diff highlighting makes reading diffs much easier, and these are supported in GitLab, but we can improve support. | **Merge request** | **Commit** | |---|---| | ![Screen_Shot_2019-05-28_at_10.06.24_AM](/uploads/d060f231529dd4e1dc90435f157c997f/Screen_Shot_2019-05-28_at_10.06.24_AM.png) | ![Screen_Shot_2019-05-28_at_10.06.53_AM](/uploads/f967ad689dc08c67a881c85c842b37bb/Screen_Shot_2019-05-28_at_10.06.53_AM.png) | ### Proposal - merge request suggestions - prose (rendered markdown) </details>
epic