Gitlab web interface not displaying newline at the end of file consistently
<!--IssueSummary start--> <details> <summary> Everyone can contribute. [Help move this issue forward](https://handbook.gitlab.com/handbook/marketing/developer-relations/contributor-success/community-contributors-workflows/#contributor-links) while earning points, leveling up and collecting rewards. </summary> - [Close this issue](https://contributors.gitlab.com/manage-issue?action=close&projectId=278964&issueIid=265146) </details> <!--IssueSummary end--> ### Summary GitLab does not display newlines at the end of files consistently across different views, and it is unintuitive to the user whether or not the newline exists or not. This causes confusion and can be frustrating for those working in Windows Resource files for example, which are used for C++ projects, and they mandate the trailing new line or else the compiler fails. ### **Current Behaviour** * MR "Changes" View file **_without_** newline at end of file ➜ Displays `\ No newline at end of file` warning![Screenshot 2024-11-29 at 3.36.52 PM.png](/uploads/6a04f5bd5fea3f1e5efd309d405c9ad2/Screenshot_2024-11-29_at_3.36.52_PM.png){width="341" height="71"} * MR "Changes" View file **_with_** newline at end of file ➜ Does not display the newline ![Screenshot 2024-11-29 at 3.39.35 PM.png](/uploads/9f72a3482d7fec3cff60f1a54cca789e/Screenshot_2024-11-29_at_3.39.35_PM.png){width="339" height="58"} * File view file **_with_** newline at end of file ➜ Displays newline ![Screenshot 2024-11-29 at 3.40.52 PM.png](/uploads/eeafd9ddc80405f856b25b2c94fc007f/Screenshot_2024-11-29_at_3.40.52_PM.png){width="341" height="80"} * Raw view file **_with_** newline at end of file ➜ doesn't include the newline in raw ![Screenshot 2024-11-29 at 3.52.39 PM.png](/uploads/bbf5a9dadfa9c70a492d6bf5ff587779/Screenshot_2024-11-29_at_3.52.39_PM.png){width="342" height="43"} * Raw file download maintains the newline at the end of file ### Steps to reproduce 1. Commit and push file with a trailing new line 2. Go into web interface, observe how the newline is displayed in diffs, file view and raw mode ### Example Project https://gitlab.com/kicad/code/kicad/-/blob/a8bd0a9b84156a10c647c47cbbdb30f748eb0a2b/resources/msw/kiwin32.rc ### What is the current _bug_ behavior? This is not a bug behaviour - it is just not intuitive in design ### What is the _desired_ behavior? New line is displayed in all modes ### Output of checks New line is displayed in all views including MR changes, File, and Raw view
issue