fix(prose): keep bare numbered replies visible - #1330
scui73414-bot wants to merge 2 commits into
Conversation
|
Table seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
|
Hey, thanks for the PR. Could you sign the CLA when you get a chance so we can review it? |
AbirAbbas
left a comment
There was a problem hiding this comment.
Checked this against dev: 32. and 1024. do render to "" on 9258f7052, the three lines in renderer.list fix it, and the new test fails on unpatched render.go — so it's a real regression test and not a tautology. I also ran the PR-gate steps locally on this head (build, vet, gofmt, packed corpora, changelog check, manual gates, make test-laws, make test PKGS=./internal/tui2/prose) and they're all green, and walked the empty-item shapes goldmark can produce (nested empty items, an empty item inside a blockquote, loose lists, a marker wider than the pane) without finding a row that's now wrong or over the width ceiling.
One gap in the coverage, inline.
| // TestABareNumberedReplyStillDraws holds the reply boundary where Markdown | ||
| // parses a number and full stop as an ordered list with an empty item. | ||
| func TestABareNumberedReplyStillDraws(t *testing.T) { | ||
| for _, src := range []string{"32.", "1024."} { |
There was a problem hiding this comment.
The reply-shaped case isn't the only thing that was being dropped — any body-less item took its own marker down with it, anywhere in a list. On dev, "1. one\n2.\n3. three" renders as
1. one
3. three
and with this change it renders all three rows. That's the case a future refactor of the pop/pending contract is most likely to re-break, and it's silent when it does, so it's worth an assertion here alongside the two bare numbers.
Summary
32.and1024.Fixes #1072.
Testing
make test-focus PKGS=./internal/tui2/prose RUN='^TestABareNumberedReplyStillDraws$'make test-touched BASE=upstream/devmake test-lawsAll listed tests pass.
make test-quickreached an unrelated failure inTestTheManualQuotesBothTasksOpeningHeadingsExactly; I reproduced that same failure on a cleanupstream/devworktree.Prepared with OpenAI Codex assistance.