mirror of
https://github.com/zed-industries/zed.git
synced 2026-05-23 21:05:08 +00:00
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
40 lines
893 B
TOML
40 lines
893 B
TOML
[package]
|
|
name = "markdown_preview"
|
|
version = "0.1.0"
|
|
edition.workspace = true
|
|
publish.workspace = true
|
|
license = "GPL-3.0-or-later"
|
|
|
|
[lints]
|
|
workspace = true
|
|
|
|
[lib]
|
|
path = "src/markdown_preview.rs"
|
|
|
|
[features]
|
|
test-support = []
|
|
|
|
[dependencies]
|
|
anyhow.workspace = true
|
|
editor.workspace = true
|
|
gpui.workspace = true
|
|
language.workspace = true
|
|
log.workspace = true
|
|
markdown.workspace = true
|
|
project.workspace = true
|
|
settings.workspace = true
|
|
theme.workspace = true
|
|
theme_settings.workspace = true
|
|
ui.workspace = true
|
|
urlencoding.workspace = true
|
|
util.workspace = true
|
|
workspace.workspace = true
|
|
zed_actions.workspace = true
|
|
|
|
[dev-dependencies]
|
|
editor = { workspace = true, features = ["test-support"] }
|
|
fs.workspace = true
|
|
gpui = { workspace = true, features = ["test-support"] }
|
|
serde_json.workspace = true
|
|
tempfile.workspace = true
|
|
workspace = { workspace = true, features = ["test-support"] }
|