Skip to content

Render leading span marker with nothing to merge as an empty cell#245

Merged
dereuromark merged 1 commit into
masterfrom
fix/table-span-marker-empty-cell
Jun 16, 2026
Merged

Render leading span marker with nothing to merge as an empty cell#245
dereuromark merged 1 commit into
masterfrom
fix/table-span-marker-empty-cell

Conversation

@dereuromark

Copy link
Copy Markdown
Contributor

A leading span marker with nothing to merge should render an empty cell, not vanish.

A colspan marker (<) in the first column has no cell to its left, and a rowspan marker (^) in the first row has no cell above. In both cases the marker has nothing to merge into, so previously it was silently dropped and the row ended up one cell short. It now renders as an empty cell instead, matching djot-js / carve parity. Normal spans into an existing left/above cell are unchanged.

Ported from carve-php commit ff40264 (table part only).

A colspan marker (`<`) in the first column has no cell to its left, and a
rowspan marker (`^`) in the first row has no cell above. Such a marker has
nothing to merge into, so it was silently dropped, leaving the row one cell
short. It now renders as an empty cell instead, matching djot-js / carve
parity.

Leftover colspan accumulation after the reverse merge loop is flushed into
empty leading cells. A rowspan marker that finds no originating cell above
becomes an empty cell rather than a dangling marker.
@dereuromark dereuromark added the bug Something isn't working label Jun 16, 2026
@codecov

codecov Bot commented Jun 16, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 96.29630% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 92.06%. Comparing base (30088b9) to head (2472bdf).

Files with missing lines Patch % Lines
src/Parser/BlockParser.php 96.29% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##             master     #245   +/-   ##
=========================================
  Coverage     92.05%   92.06%           
- Complexity     3566     3571    +5     
=========================================
  Files           107      107           
  Lines         10093    10118   +25     
=========================================
+ Hits           9291     9315   +24     
- Misses          802      803    +1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@dereuromark dereuromark merged commit 306e362 into master Jun 16, 2026
6 checks passed
@dereuromark dereuromark deleted the fix/table-span-marker-empty-cell branch June 16, 2026 11:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant