Repository navigation
Copy editor: rewrap inside quotes, writing each level as Markdown's > - #1466
Merged
Merged
Conversation
Claude Code draws a Markdown quote with a quote bar (U+258E) on every row, nested quotes as one bar per level. The bar sits in Block Elements, so the copy editor read it as box-drawing decoration: a single level was stripped, pasting the quote as unquoted prose, and the inner bar of a nested quote was text that landed mid-sentence once Auto joined its rows. A hard-wrapped Markdown `>` quote had the same flaw from the other side: nothing marked the prefix, so joining its rows left `a > b` behind. A quote prefix is now its own fact of a logical line: one marker per level, `>` or a quote bar, before text. Auto keeps a break where depth changes and judges the rest of a quoted line as if unquoted; every format writes a bar as `>` and drops a prefix with the break deleted before it, so Spaces and per-break overrides follow the same rule. An empty bar line is a blank line inside the quote, not a frame; a lone `>` stays text (an empty prompt). Paragraph scope starts a quoted paragraph at its prefix. The issue's sample also kept two breaks for a second reason: a wrapper that keeps the space it broke at (wrap-ansi with trim: false) carries it onto the row after a full one, which then sits one column deeper than its hanging indent, and the row after that one column shallower. Auto now joins both. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Deploying mouseterm with
|
| Latest commit: |
4686a1c
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://87c66851.mouseterm.pages.dev |
| Branch Preview URL: | https://issue-22-rewrap-quotes.mouseterm.pages.dev |
dormouse-bot
left a comment
Collaborator
There was a problem hiding this comment.
One open question about which ▎ lines count as quotes; see the inline comment.
Neovim's indent-blankline draws `▎`, the bar Claude Code quotes with, at every indent stop and on blank lines inside a block. Any bar before text was a quote, so a guided code line pasted as `> > print(x)` with its indent gone, and a guide alone on a blank line became an empty `>` line. The two differ in spacing: Claude Code writes its bar one space from its text (two where a wrap carried a space), and a guide at a shiftwidth of 3 or more sits further. A quote bar is now at most two spaces from text that is no other marker, and a prefix needs text after it, so a lone bar is decoration again. A leading run of wider guides is now blanked whole, where before only the first was, leaving the inner guides of nested code in the paste. At shiftwidth 2 guides still read as quote bars; the rationale records the trade. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
dormouse-bot
left a comment
Collaborator
There was a problem hiding this comment.
Lines that hold only a bar are now dropped, not kept blank, so a Claude Code quote with more than one paragraph pastes as a single paragraph; see the inline comment.
Round 1 made a line of bars alone frame-only, so it was dropped: a Claude Code quote of several paragraphs pasted as one Markdown paragraph, and code under Neovim's indent guides lost its blank lines. Such a line is either a quote's paragraph break or a guide on a blank code line; its neighbors tell which. It is now blank (and a paragraph boundary), and between two quoted lines it is written with the shallower one's prefix, so the quote goes on past it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
dormouse-bot
left a comment
Collaborator
There was a problem hiding this comment.
Every blank line between two quoted lines now gets a quote prefix, including an empty row that has no bar on it, so two separate quotes paste as one; see the inline comment.
Round 2 wrote the shallower quote prefix onto every blank line between two quoted lines, but a truly empty row is blank too, so two quotes an empty row separates (a Markdown file or email shown with `cat`, or two Claude Code quotes) pasted as one. Only a row of bars alone is now written as a quote line, as the spec already says. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Claude Code draws a Markdown quote with a quote bar (U+258E) on every row, nested quotes as one bar per level. The bar sits in Block Elements, so the copy editor read it as box-drawing decoration: a single level was stripped, pasting the quote as unquoted prose, and the inner bar of a nested quote was text that landed mid-sentence once Auto joined its rows. A hard-wrapped Markdown
>quote had the same flaw from the other side: nothing marked the prefix, so joining its rows lefta > bbehind.A quote prefix is now its own fact of a logical line: one marker per level, with text after it — a
>, or a quote bar at most two spaces from its text. Auto keeps a break where depth changes and judges the rest of a quoted line as if unquoted; every format writes a bar as>and drops a prefix with the break deleted before it, so Spaces and per-break overrides follow the same rule. Paragraph scope starts a quoted paragraph at its prefix.The same
▎is the default indent guide of Neovim's indent-blankline, drawn at every indent stop and on blank lines. A guide at a shiftwidth of 3 or more sits further from its text than Claude Code's bar, so it stays indentation; a line of bars alone is a blank line, written between quoted lines with the shallower one's prefix so a quote's paragraphs stay apart; and a leading run of guides is now blanked whole, where before only the first was, so nested guided code pastes with its full indent. At shiftwidth 2 guides still read as quote bars (recorded in the rationale).The issue's sample also kept two breaks for a second reason: a wrapper that keeps the space it broke at (wrap-ansi with trim: false) carries it onto the row after a full one, which then sits one column deeper than its hanging indent, and the row after that one column shallower. Auto now joins both.
Merge before #1475 (#85), which conflicts in
copy-text.tsandmouse-and-clipboard.mdand gets rebased after this lands.Fixes #22
🤖 Generated with Claude Code