Files
zed/crates/markdown
Om Chillure a4b39c38e0 markdown_preview: Stop rounding image corners (#65474)
## Summary

Closes #65311

Images in the Markdown preview were always drawn with rounded corners,
because `MarkdownElement` applied `.rounded_md()` to every image. Badges
such as shields.io looked different from how GitHub and browsers render
them.

The rounding was added on purpose for images in the agent panel
(#56427), so this PR doesn't remove it everywhere. It adds a
`rounded_images` field to `MarkdownStyle`, which defaults to `true`. The
preview style overrides set it to `false`. Other uses of
`MarkdownStyle`, including the agent panel, look the same as before.

If reviewer prefer that images stay square everywhere, the alternative
is to drop the `.rounded_md()` call and the new field. That's simpler
but also changes the agent panel. I can change current apporach to this
if needed.


### Before
<img width="1920" height="1080" alt="Screenshot from 2026-10-11
17-55-18"
src="https://github.com/user-attachments/assets/6e96bfd2-b516-4c8e-815e-fb49b7a394af"
/>

### After
<img width="1920" height="1080" alt="image"
src="https://github.com/user-attachments/assets/07d7ca1b-69ff-4a5d-a66b-1a2026c6e561"
/>


## Testing

- `cargo check -p markdown -p markdown_preview` passes.
- `cargo test -p markdown`: all 186 existing tests pass. No new test was
added because this is a visual change.


To manual test, create a Markdown file containing:

![license](https://img.shields.io/badge/license-MIT-blue?style=flat-square)

Open the Markdown preview. The badge should have square corners. Then
paste an image into the agent panel and check that it's still rounded
there.


## Self-review
- [x] I've reviewed my diff for quality, security, reliability, and
performance.
- [x] UI changes follow the
[checklist](https://zed.dev/docs/development/ui-checklist).
- [x] Tests cover the new or changed behavior.


Release Notes:
- Fixed images in the Markdown preview being rendered with rounded
corners.
2026-11-01 00:33:56 +00:00
..