zed/crates/markdown_preview
Pronsh df92d593cd
markdown_preview: Fix Ctrl+S saving checkbox toggle state (#53236)
Changes Made:

- Adding the `Item::can_save()`, `save()`, `save_as()`, `can_save_as()`
functions to help the Editor save when a checkbox is toggled
- Small refactor to seperate checkbox toggle and refreshing preview
- Adding support for both `/...` and `\\...` for windows users. [NOTE: I
no longer own a window's machine and I am unsure if this is correct, and
will fix it immediately if this is wrong]
- Resolving preview paths, strips out the fragment, and image paths are
coalesced to None if they don't exist
- Adding Tests for the added behaviour [NOTE: would love feedback since
this is the first time I am writing tests, and had a bit of assistance
from an AI, but manually reviewed the code and ran the application and
it seemed fine]

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

Closes #46901

Release Notes:

- Fixed Crtl+S saving while toggling checkbox in preview mode
2026-04-27 08:47:27 +00:00
..
src markdown_preview: Fix Ctrl+S saving checkbox toggle state (#53236) 2026-04-27 08:47:27 +00:00
Cargo.toml markdown_preview: Fix Ctrl+S saving checkbox toggle state (#53236) 2026-04-27 08:47:27 +00:00
LICENSE-GPL Add initial markdown preview to Zed (#6958) 2024-02-01 11:03:09 +02:00