Keep exported CSV cells on one line so Excel renders normal rows - #89
Merged
Merged
Conversation
NOT a parsing problem -- the file parses as exactly 4 columns and always did; the empty columns to the right of D in the report are Excel's own, not data. The defect is row HEIGHT: a markdown answer carries 20-30 newlines (26 and 17 in the two rows reported), a CSV cell may legally contain them, and Excel wraps such a cell and grows the row to fit. A two-row export therefore rendered as two screen-height blocks with the text in a column a few characters wide. Nothing in the format can fix this -- a .csv carries no column widths and no row heights -- so the only lever is the content. The two reference columns are now collapsed onto one line, with paragraph breaks becoming a pilcrow rather than disappearing: the reader has to judge an answer from that cell, and dropping every structural boundary would turn 1,400 characters into an unbroken wall. The Correction column is deliberately NOT touched. It is the one a reviewer authors, and re-flowing their line breaks on each export would edit their prose a little more every round trip. Matching is unaffected: `_qkey` collapses whitespace on both sides, so a question re-flowed on export still matches the transcript it came from. Verified: one physical line per logical row, zero newlines in every cell, pilcrows preserved (8 and 6), `_qkey` equal across the reflow, a full export -> fill column D -> import cycle landing both corrections with nothing ignored, and a multi-line correction surviving re-export byte-exact while the answer beside it stays single-line. Claude-Session: https://claude.ai/code/session_01VVNYqGza2dFdeWFX7qXnwb
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
NOT a parsing problem -- the file parses as exactly 4 columns and always did; the
empty columns to the right of D in the report are Excel's own, not data. The defect
is row HEIGHT: a markdown answer carries 20-30 newlines (26 and 17 in the two rows
reported), a CSV cell may legally contain them, and Excel wraps such a cell and
grows the row to fit. A two-row export therefore rendered as two screen-height
blocks with the text in a column a few characters wide.
Nothing in the format can fix this -- a .csv carries no column widths and no row
heights -- so the only lever is the content. The two reference columns are now
collapsed onto one line, with paragraph breaks becoming a pilcrow rather than
disappearing: the reader has to judge an answer from that cell, and dropping every
structural boundary would turn 1,400 characters into an unbroken wall.
The Correction column is deliberately NOT touched. It is the one a reviewer authors,
and re-flowing their line breaks on each export would edit their prose a little more
every round trip.
Matching is unaffected:
_qkeycollapses whitespace on both sides, so a questionre-flowed on export still matches the transcript it came from.
Verified: one physical line per logical row, zero newlines in every cell, pilcrows
preserved (8 and 6),
_qkeyequal across the reflow, a full export -> fill column D-> import cycle landing both corrections with nothing ignored, and a multi-line
correction surviving re-export byte-exact while the answer beside it stays
single-line.
Claude-Session: https://claude.ai/code/session_01VVNYqGza2dFdeWFX7qXnwb