[go: up one dir, main page]

Skip to content

Single File Editor doesn't add trailing newline

Update - 2020-01-08

In this comment we propose resolving this issue by first letting the Single-File-Editor respect .editorconfig, so that we aren't enforcing a behavior which the user can't override.

Summary

The Single File Editor doesn't add trailing newlines to edited files, while the Web IDE does.

Steps to reproduce

SFE shows one line when you create a new file:

image

Web IDE shows two lines:

image

But importantly, even if I remove this second line in the Web IDE:

image

It will still get added when committing (you can also see it in the diff view in the Web IDE), but not when doing the same through the SFE.

Example Project

What is the current bug behavior?

The Single File Editor doesn't insert a trailing newline.

What is the expected correct behavior?

The Single File Editor should insert a trailing newline.

Relevant logs and/or screenshots

Output of checks

This bug happens on GitLab.com

Possible fixes

Edited by Paul Slaughter