Markdown blockquotes wrap mid-sentence and orphan words onto their own line
- Ngôn ngữ chính
- Shell
- Star
- 11.2k
- Fork
- 1.9k
- Merge trung bình
- 14 giờ 16 phút
- Pull request đã merge (30 ngày)
- 6
Mô tả
## Description
When the agent's response contains a markdown blockquote (`> ...`) that runs longer than the terminal width, the renderer wraps the line in a way that puts the last word or two of a sentence onto its own line, with the rest of the paragraph continuing on a subsequent line. This makes the output look broken and is hard to copy-paste cleanly into another app (Slack, email, GitHub comment).
It happens consistently with blockquoted paragraphs of more than ~1.5 terminal lines. I've hit it in many sessions over several months across different repos and tasks. Asking the agent to "stop using blockquotes" works as a session-local workaround, but the underlying renderer behaviour is the bug.
## Steps to reproduce
1. In a terminal of any width (seen at 120 and 180 chars).
2. Ask the agent to draft a message, comment, or email so it produces a markdown blockquote with at least two sentences:
```
> Thanks Dave. Dropped an issue on the repo with the detail.
>
> Short version: we're early days on this, still designing and building, no real traffic yet. The one thing we know for certain is that both our inbound and outbound HTTP will be with external vendors, so getting a clean way to tag spans and metrics with the caller (inbound) and the target (outbound) from day one is what we're after, rather than retrofitting it later. Happy to jump on the chat you set up whenever suits.
```
## Expected behaviour
Blockquote wraps cleanly at word boundaries near the right margin, like a normal paragraph would.
## Actual behaviour
Words near the end of a logical line get pushed onto their own line, leaving large blank gaps. Example from a real session:
```
Short version: we're early days on this, still designing and building, no real traffic yet. The one thing we know for certain is that both our inbound and outbound HTTP will be with external vendors, so
getting
a clean way to tag spans and metrics with the caller (inbound) and the target (outbound) from day one is what we're after, rather than retrofitting it later. Happy to jump on the chat you set up whenever
suits.
```
Note `getting` and `suits` end up alone on a line with leading whitespace.
## Environment
- CLI version: `1.0.34`
- OS: macOS (Darwin)
- Terminal: Ghostty
- Frequency: every session that uses blockquotes for prose
## Additional context
- Numbered lists and bullet lists render fine for me at the same widths.
- Plain paragraphs (no `> `) render fine.
- Code fences render fine.
- The issue is specific to blockquoted prose.
Hướng dẫn đóng góp
Hướng nghiên cứu
Trước tiên, hãy tái hiện vấn đề trong CLI bằng phần văn bản được cung cấp ở dạng blockquote với độ rộng terminal là 120 và 180, sau đó lần theo đường đi của quá trình render và ngắt dòng blockquote trong Markdown. So sánh với các đoạn văn thông thường, danh sách đánh số, danh sách dấu đầu dòng và code fences, vốn được báo cáo là render đúng. Công việc được xem là hoàn tất khi phần văn bản ở dạng blockquote được ngắt dòng tại ranh giới giữa các từ mà không có từ bị lẻ dòng hoặc khoảng trống lớn, đồng thời vẫn giữ nguyên hành vi đúng hiện có đối với các nội dung khác.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- shell
- Lĩnh vực
- cli
- Loại issue
- Lỗi
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức độ hoạt động
- Ít trao đổi
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 55/100