[go: up one dir, main page]

Skip to content

Suggestion to change two blank lines to one doesn't work

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

A MR adds two consecutive blank lines. If I select them and press the button to add a suggestion, I get (as expected) a suggestion block like:

```suggestion:-1+0


```

Since consecutive blank lines are silly, I want to suggest reducing this to one blank line:

```suggestion:-1+0

```

However, GitLab incorrectly renders (and perhaps applies) this as:

-
-

...that is, showing to remove both blank lines and replace them with nothing, when the suggestion still contains a blank line.

A correct rendering would be:

 
-

See e.g. https://gitlab.kitware.com/cmake/cmake/-/merge_requests/10883#note_1673338.

Note, I'm not sure if this works correctly if the suggestion has more context (i.e. starts and ends with non-blank lines).

Edited by 🤖 GitLab Bot 🤖