{segment.text}
); + } case "image": return renderImageEvidence(index, imageContent, segment); default: { @@ -139,6 +151,10 @@ function isStructuredTableRow(unit: PostContentUnit): boolean { ); } +function structuredTableCells(unit: PostContentUnit): string[] { + return unit.unit_text.split(/\s*\|\s*/); +} + /** * Match a persisted unit to its source-rendering counterpart without relying * on ordinal position. A table row can occupy a persisted non-text unit while @@ -231,12 +247,17 @@ function renderStructuredUnits( rows.push(structureUnits[index]); index += 1; } + for (const row of rows) { + for (const cell of structuredTableCells(row)) { + sourceTextForUnit(cell); + } + } rendered.push(| {cell} | ))}