Web text editor automatically appends a newline at the end of the file

Does anyone know how to fix this issue? I told someone to remove the final line commit but they said they didn’t touch anything. tried it myself and github does actually append the newline.

this is their pr

this is my reproduction of it showing a different issue

The commit is done on the web editor, which does check if the content changed before allowing the user to register their commit.

Steps to reproduce

  1. Find a file with no final new line on the last line
  2. Edit somewhere else
  3. Compare the two branches

If this is something that isn’t fixable at least I’ll permanently add a new line at the end myself and avoid this issue completely.

Please do everyone a favor and just add the newline at the end of all your text files.

Git and various other text editing things will thank you. (As will I, when I randomly visit your repository.)