Highlight zero-width space changes
### Summary In GitLab's diffs, one cannot see that a line includes a [zero-width space change](https://en.wikipedia.org/wiki/Zero-width_space). As these spaces can break things, they should be highlighted. ### Steps to reproduce Commit [a file with a zero-width space](https://gitlab.com/fdroid/repomaker/blob/a092f3d583cdecc8cd231dc352f633a814d43ae3/debian/data/org.fdroid.repomaker.appdata.xml) to a Git repo and push that repo to GitLab. Then, commit [an updated file without that zero-width space](https://gitlab.com/fdroid/repomaker/blob/9b1e98e257ff66a446f01d1a3ab487138830aaee/debian/data/org.fdroid.repomaker.appdata.xml) to Git and push the commit to GitLab. Take a look at the diff shown in GitLab. ### Example Project See https://gitlab.com/fdroid/repomaker/merge_requests/206/diffs. ### What is the current *bug* behavior? The diff shows a line change where it seems that nothing has changed. ### What is the expected *correct* behavior? The zero-width space change is highlighted. ### Relevant logs and/or screenshots `git diff` also doesn't highlight the change: ```diff diff --git a/debian/data/org.fdroid.repomaker.appdata.xml b/debian/data/org.fdroid.repomaker.appdata.xml index d5f5c05..198bb70 100644 --- a/debian/data/org.fdroid.repomaker.appdata.xml +++ b/debian/data/org.fdroid.repomaker.appdata.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -​<component type="desktop-application"> +<component type="desktop-application"> <id>org.fdroid.repomaker</id> <metadata_license>CC-BY-SA-4.0</metadata_license> <project_license>AGPL-3.0</project_license> ``` `git commit -v` does highlight the change with `<200b>`: ```diff diff --git a/debian/data/org.fdroid.repomaker.appdata.xml b/debian/data/org.fdroid.repomaker.appdata.xml index d5f5c05..198bb70 100644 --- a/debian/data/org.fdroid.repomaker.appdata.xml +++ b/debian/data/org.fdroid.repomaker.appdata.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<200b><component type="desktop-application"> +<component type="desktop-application"> <id>org.fdroid.repomaker</id> <metadata_license>CC-BY-SA-4.0</metadata_license> <project_license>AGPL-3.0</project_license> ``` ### Output of checks This bug happens on GitLab.com
issue