Skip to content

markdown: Improve table cell alignment - #53465

Merged
smitbarmase merged 4 commits into
zed-industries:mainfrom
davidalecrim1:feat-align-md-table-text
May 7, 2026
Merged

markdown: Improve table cell alignment#53465
smitbarmase merged 4 commits into
zed-industries:mainfrom
davidalecrim1:feat-align-md-table-text

Conversation

@davidalecrim1

@davidalecrim1 davidalecrim1 commented Apr 9, 2026

Copy link
Copy Markdown
Contributor

Summary

Markdown preview tables kept text pinned to the top of a row when a neighboring cell contained a taller image. This made mixed text-and-image tables look unbalanced and inconsistent with common editor behavior. This change makes table text stay visually centered within taller rows so Markdown tables are easier to scan and match expected rendering more closely.

Before / After

Before After
Screenshot 2026-04-08 at 19 55 50 Screenshot 2026-04-08 at 21 47 31

References

Inspired by comparing this with VS Code preview
Screenshot 2026-04-08 at 21 54 06

Release Notes:

  • Improved Markdown preview table cells to vertically center content in tall rows and respect column alignment from the table header.

@cla-bot cla-bot Bot added the cla-signed The user has signed the Contributor License Agreement label Apr 9, 2026
@zed-codeowner-coordinator
zed-codeowner-coordinator Bot requested review from a team, Anthony-Eid and nathansobo and removed request for a team April 9, 2026 00:56
@zelenenka zelenenka assigned smitbarmase and unassigned nathansobo Apr 15, 2026
@smitbarmase
smitbarmase force-pushed the feat-align-md-table-text branch from febbe9d to d001657 Compare May 7, 2026 10:40

@smitbarmase smitbarmase left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! I bundled a couple of fixes before merging: table column alignment (:---, :---:, ---:) wasn't being applied, so cells and checkboxes always rendered left-aligned. Both now follow the column alignment. Thanks again for working on this!

@smitbarmase smitbarmase changed the title markdown: Center table text in tall rows markdown: Improve table cell alignment May 7, 2026
@davidalecrim1

Copy link
Copy Markdown
Contributor Author

Awesome @smitbarmase , thanks for the review and enhancements brough on this!

@smitbarmase
smitbarmase added this pull request to the merge queue May 7, 2026
Merged via the queue into zed-industries:main with commit e6b8b30 May 7, 2026
33 checks passed
GoldStrikeArch pushed a commit to GoldStrikeArch/zed that referenced this pull request May 8, 2026
…ent (zed-industries#56179)

Follow up: zed-industries#53465

For Markdown tables, headers are now always centered (ignoring column
alignment), matching standard Markdown rendering behavior. For HTML
tables, headers default to center but respect explicit `align`
attributes.

This also propagates alignment to paragraphs and headings inside table
cells, not just the cell container itself.

Release Notes:

- N/A
jasonsmithio pushed a commit to paddleboarddev/paddleboard that referenced this pull request May 31, 2026
…ent (#56179)

Follow up: zed-industries/zed#53465

For Markdown tables, headers are now always centered (ignoring column
alignment), matching standard Markdown rendering behavior. For HTML
tables, headers default to center but respect explicit `align`
attributes.

This also propagates alignment to paragraphs and headings inside table
cells, not just the cell container itself.

Release Notes:

- N/A
jonx pushed a commit to jonx/zed-aros that referenced this pull request Jul 17, 2026
## Summary

Markdown preview tables kept text pinned to the top of a row when a
neighboring cell contained a taller image. This made mixed
text-and-image tables look unbalanced and inconsistent with common
editor behavior. This change makes table text stay visually centered
within taller rows so Markdown tables are easier to scan and match
expected rendering more closely.

## Before / After

| Before | After |
| --- | --- |
| <img width="849" height="869" alt="Screenshot 2026-04-08 at 19 55 50"
src="https://github.com/user-attachments/assets/b3751bff-3750-4ca1-8997-6f5265e4d291"
/> | <img width="898" height="734" alt="Screenshot 2026-04-08 at 21 47
31"
src="https://github.com/user-attachments/assets/d853c0a1-800c-4a2a-aec9-e0ef08453fa7"
/> |

## References
Inspired by comparing this with VS Code preview
<img width="1286" height="878" alt="Screenshot 2026-04-08 at 21 54 06"
src="https://github.com/user-attachments/assets/8dbbfe28-9980-4012-94f1-1b5b3503065b"
/>

Release Notes:

- Improved Markdown preview table cells to vertically center content in
tall rows and respect column alignment from the table header.

---------

Co-authored-by: Smit Barmase <heysmitbarmase@gmail.com>
jonx pushed a commit to jonx/zed-aros that referenced this pull request Jul 17, 2026
…ent (zed-industries#56179)

Follow up: zed-industries#53465

For Markdown tables, headers are now always centered (ignoring column
alignment), matching standard Markdown rendering behavior. For HTML
tables, headers default to center but respect explicit `align`
attributes.

This also propagates alignment to paragraphs and headings inside table
cells, not just the cell container itself.

Release Notes:

- N/A
jolutz pushed a commit to jolutz/zed that referenced this pull request Aug 8, 2026
## Summary

Markdown preview tables kept text pinned to the top of a row when a
neighboring cell contained a taller image. This made mixed
text-and-image tables look unbalanced and inconsistent with common
editor behavior. This change makes table text stay visually centered
within taller rows so Markdown tables are easier to scan and match
expected rendering more closely.

## Before / After

| Before | After |
| --- | --- |
| <img width="849" height="869" alt="Screenshot 2026-04-08 at 19 55 50"
src="https://github.com/user-attachments/assets/b3751bff-3750-4ca1-8997-6f5265e4d291"
/> | <img width="898" height="734" alt="Screenshot 2026-04-08 at 21 47
31"
src="https://github.com/user-attachments/assets/d853c0a1-800c-4a2a-aec9-e0ef08453fa7"
/> |

## References
Inspired by comparing this with VS Code preview
<img width="1286" height="878" alt="Screenshot 2026-04-08 at 21 54 06"
src="https://github.com/user-attachments/assets/8dbbfe28-9980-4012-94f1-1b5b3503065b"
/>

Release Notes:

- Improved Markdown preview table cells to vertically center content in
tall rows and respect column alignment from the table header.

---------

Co-authored-by: Smit Barmase <heysmitbarmase@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed The user has signed the Contributor License Agreement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants