# markdown: Add ability to wrap/unwrap codeblock content \(\#57312\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 0042fb5850086a072f5ba5de5457fa182496277d

Requested commit: 0042fb5850086a072f5ba5de5457fa182496277d

Commit: 0042fb5850086a072f5ba5de5457fa182496277d

Tree: f87a26569dea7cbc6ff854ccc8590ffcb71db7c1

Author: Danilo Leal

Committer: GitHub

## Message

```
markdown: Add ability to wrap/unwrap codeblock content  (#57312)

This PR adds an icon button to Markdown codeblocks allowing to control
whether or not the content should be wrapped. At the moment, this is not
hard-persisted, meaning that 1) wrapping text in one codeblock instance
does not affect others, and 2) the codeblock will be reset every time
its view is recreated (i.e., closing and opening a Markdown Preview tab,
an agent thread, etc.). I intentionally kept it simple just to see how
it feels, but we can certainly consider a setting later on.

| Unwrapping | Wrapping |
|--------|--------|
| <img width="782" height="658" alt="Screenshot 2026-05-20 at 5  09
2@2x"
src="https://github.com/user-attachments/assets/e9151e91-32ba-40d4-9c65-535dec309291"
/> | <img width="736" height="604" alt="Screenshot 2026-05-20 at 5 
09@2x"
src="https://github.com/user-attachments/assets/157db6fd-ec4c-4c96-b44a-119273cbd0f9"
/> |

Release Notes:

- Added the ability to control codeblock content wrapping through the
UI.
```

## Parents

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

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