# editor: Improve JSDoc extend comment on newline to follow convention \(\#30800\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 18d39e3f812463ecd6f9e4649a82bb4f547eccce

Requested commit: 18d39e3f812463ecd6f9e4649a82bb4f547eccce

Commit: 18d39e3f812463ecd6f9e4649a82bb4f547eccce

Tree: 168ce1ceba15216a901a805968279c51640db845

Author: Smit Barmase

Committer: GitHub

## Message

```
editor: Improve JSDoc extend comment on newline to follow convention (#30800)

Follow up for https://github.com/zed-industries/zed/pull/30768

This PR makes JSDoc auto comment on new line lot better by:

- Inserting delimiters regardless of whether previous delimiters have
trailing spaces or not
- When on start tag, auto-indenting both prefix and end tag upon new
line

This makes it correct as per convention out of the box. No need to
manually adjust spaces on every new line.


https://github.com/user-attachments/assets/81b8e05a-fe8a-4459-9e90-c8a3d70a51a2

Release Notes:

- Improved JSDoc auto-commenting on newline which now correctly indents
as per convention.
```

## Parents

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

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