Difference in last line rendering. Browse file two lines, MR - one line.
**Summary** There is an inconsistency in how GitLab renders files with a trailing newline (`\n`): - In the **file view**, the newline is rendered correctly (shown as an empty line). - In the **diff view**, the same newline is not rendered at all — making it appear as if the file ends without one. --- **Steps to reproduce** 1. Create a new file with a single line ending in a newline character, e.g. `FOO=BAR\n`. 2. Commit and push the file to GitLab. 3. View the file in the repository browser (file view). 4. View the same file in a merge request or commit diff (diff view). --- **Environment info** - GitLab version: Self hosted 18.3.2 - Reproduced with multiple file types (`.env`, `.conf`, `.bazeliskrc`, `.txt`) - Render the trailing newline in the diff view as an empty line - Add visual markers or toggles for end-of-line characters - Align the diff view behavior with the file view for consistency ![view_mode](/uploads/76a7e1d4342681357ae23f8a0ffa4933/image.png) ![diff_mode](/uploads/4a06c772e8cf051aa3fb7cd94ded9ab8/image.png)
issue