# Add action to toggle block quotes in Markdown \(\#58383\) · gitcafe/zed

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

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

Visibility: public

Requested revision: c83cef450f01fa65721bc088fcdca444462caebe

Requested commit: c83cef450f01fa65721bc088fcdca444462caebe

Commit: c83cef450f01fa65721bc088fcdca444462caebe

Tree: 939d019a3fa9b5f0785b2eeb4c8dbe89350f0645

Author: Joseph T\. Lyons

Committer: GitHub

## Message

```
Add action to toggle block quotes in Markdown (#58383)

This PR adds an action to toggle block quotes on and off for the
selected lines while in Markdown. I'm using my own binding in the demo
video, this PR does not bind it to anything.


https://github.com/user-attachments/assets/5c1f4121-e863-459d-8a9b-8eefdbfb888e

When there's a mixture of quoted and "unquoted" lines, we normalize to
quoted:


https://github.com/user-attachments/assets/ca003844-0c4f-4cae-a7d0-a9d355258f2d

While adding this, I noticed that `editor.rs` had been through some
refactoring in order to reduce its size. Because of this, I introduced
`markdown_actions.rs`, as I intend to follow up with some other markdown
toggling actions (eg: `markdown: toggle bold`, `markdown: toggle
italic`, etc.)

The implementation reuses the existing `manipulate_mutable_lines` code
that all line manipulating actions run through.

Self-Review Checklist:

- [X] I've reviewed my own diff for quality, security, and reliability
- [X] Unsafe blocks (if any) have justifying comments
- [X] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [X] Tests cover the new/changed behavior
- [X] Performance impact has been considered and is acceptable

Release Notes:

- Added a `markdown: toggle block quote` action
```

## Parents

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

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