Skip to content

fix: to_markdown produces single space for empty cells#14

Merged
f-y merged 1 commit into
mainfrom
fix/13-empty-cell-spacing
Mar 5, 2026
Merged

fix: to_markdown produces single space for empty cells#14
f-y merged 1 commit into
mainfrom
fix/13-empty-cell-spacing

Conversation

@f-y

@f-y f-y commented Mar 5, 2026

Copy link
Copy Markdown
Collaborator

Closes #13

Summary

to_markdown was producing | | (2 spaces) for empty cells instead of | | (1 space).

Changes

  • generator.py: Added _format_cell and _build_row helpers that properly format empty cells with a single space
  • test_generator.py: Added 2 test cases (all-empty row, mixed empty/non-empty row)
  • 13.fix.md: Release fragment

Verification

  • All 309 tests pass
  • Pyright: 0 errors

Empty table cells were producing '|  |' (2 spaces) instead of '| |'
(1 space). Refactored cell formatting in generator.py to use
_format_cell and _build_row helpers.

Added tests for all-empty and mixed empty/non-empty cell rows.
@f-y
f-y merged commit 0e3f0f7 into main Mar 5, 2026
1 check passed
@f-y
f-y deleted the fix/13-empty-cell-spacing branch March 5, 2026 06:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix: to_markdown produces double spaces for empty cells

1 participant