# editor: Separate delimiters computation from the newline method \(\#45119\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 1cf3422787cea9fe494ba37fcbab1c7a1a2ae899

Requested commit: 1cf3422787cea9fe494ba37fcbab1c7a1a2ae899

Commit: 1cf3422787cea9fe494ba37fcbab1c7a1a2ae899

Tree: 3871df1c86aad6c3c7705637b321254c00b5d0c5

Author: Smit Barmase

Committer: GitHub

## Message

```
editor: Separate delimiters computation from the newline method (#45119)

Some refactoring I ran into while working on automatic Markdown list
continuation on newline.

This PR:
- Moves `comment_delimiter` and `documentation_delimiter` computation
outside of newline method.
- Adds `NewlineFormatting`, which holds info about how newlines affect
indentation and other formatting we need.
- Moves newline-specific methods into the new `NewlineFormatting`
struct.

Release Notes:

- N/A
```

## Parents

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

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