# editor: Fix block comment incorrectly continues to next line in some cases \(\#31204\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/dd4e8b9e66b4ec816514b457a014dff46904d16e)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: dd4e8b9e66b4ec816514b457a014dff46904d16e

Requested commit: dd4e8b9e66b4ec816514b457a014dff46904d16e

Commit: dd4e8b9e66b4ec816514b457a014dff46904d16e

Tree: 306083bf7c7c02b19347b26c3f40b825a812b2ee

Author: smit

Committer: GitHub

## Message

```
editor: Fix block comment incorrectly continues to next line in some cases (#31204)

Closes #31138

Fix edge case where adding newline if there is text afterwards end
delimiter of multiline comment, would continue the comment prefix. This
is fixed by checking for end delimiter on whole line instead of just
assuming it would always be at end.

- [x] Tests

Release Notes:

- Fixed the issue where in some cases the block comment continues to the
next line even though the comment block is already closed.
```

## Parents

- [b188e5d3aa0f3c027b9f8b263c2466936392ca65](https://git.cafe/gitcafe/zed/commit/b188e5d3aa0f3c027b9f8b263c2466936392ca65?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/dd4e8b9e66b4ec816514b457a014dff46904d16e?format=markdown)
