# markdown: Auto-size table columns to content width \(\#61773\) · gitcafe/zed

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

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

Visibility: public

Requested revision: cdf33ac25e3c9b65294d22a027e50eca6e8ab53a

Requested commit: cdf33ac25e3c9b65294d22a027e50eca6e8ab53a

Commit: cdf33ac25e3c9b65294d22a027e50eca6e8ab53a

Tree: 8a8fce3ee57ba19ed036cba6767c603f4d9dfd11

Author: Tim Vermeulen

Committer: GitHub

## Message

```
markdown: Auto-size table columns to content width (#61773)

Closes https://github.com/zed-industries/zed/issues/62498
Fixes #50044:

| before | after |
| --- | --- |
| <img width="1260" height="1449" alt="before"
src="https://github.com/user-attachments/assets/84dfca5a-66da-4179-90f3-8408255346d4"
/> | <img width="1260" height="1449" alt="after"
src="https://github.com/user-attachments/assets/d63f9128-1397-4f1a-87a5-4e681e9b65f0"
/> |

~Submitted as a draft PR because it relies on
https://github.com/DioxusLabs/taffy/pull/1001. I temporarily pinned our
`taffy` dependency to that particular branch to make the new tests
pass.~ That fix got released!

This fix is similar to the original fix in #50839 which got partially
reverted by #52864 due to a regression, and
`test_table_never_renders_past_its_available_width` ensures this doesn't
regress again.

## 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 adheres to Zed's UI standards
([UX/UI](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
and
[icon](https://github.com/zed-industries/zed/blob/main/crates/icons/README.md)
guidelines)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

---

Release Notes:

- Markdown table columns are now sized based on their content.
```

## Parents

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

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