Conversation
|
Note Reviews pausedUse the following commands to manage reviews:
Use the checkboxes below for quick actions:
WalkthroughBuffer prefixed lines that open an unclosed inline-code backtick run into PendingPrefix; join continuations while tracking exact fence lengths and hard-breaks; update span state incrementally; flush buffered prefixed output only when the span closes or a hard-break forces emission. ChangesInline code span detection and soft-wrap deferral
Sequence Diagram(s) sequenceDiagram
participant PrefixHandler
participant Scanning
participant ContinuationModule
participant ParagraphWriter
PrefixHandler->>Scanning: parse_open_code_span(prefix_line.rest)
Scanning-->>PrefixHandler: Option<(open_fence_len, remainder)>
PrefixHandler->>ContinuationModule: store PendingPrefix and await continuations
ContinuationModule->>Scanning: scan_continuation_span_state(continuation, fence_len)
ContinuationModule->>ParagraphWriter: emit_pending_prefix_segment(...) on Flush
Caution Pre-merge checks failedPlease resolve all errors before merging. Addressing warnings is optional.
❌ Failed checks (2 errors, 4 warnings)
✅ Passed checks (14 passed)
📋 Issue PlannerBuilt with CodeRabbit's Coding Plans for faster development and fewer bugs. View plan used: ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (2)
tests/wrap/spanning_code_spans.rs (2)
90-98: 🧹 Nitpick | 🔵 Trivial | 💤 Low valueAdd more cases or convert to a regular test.
This rstest has only one case. Add variations (multiple open spans, different prefixes, escaped backticks) or convert to
#[test].🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@tests/wrap/spanning_code_spans.rs` around lines 90 - 98, The rstest test_wrap_defers_while_any_span_stays_open currently supplies only one case and should either be expanded with additional #[case] inputs or converted to a plain #[test]; update the test to include multiple variations (e.g., multiple open spans, different leading prefixes, escaped backticks) by adding more #[case] parameters to the function signature or replace the #[rstest] attribute with #[test] and iterate through a small vector of inputs that call wrap_text(&input, 80) and assert the same conditions (presence of "`done`" and "`open span`" or their expected equivalents) so the behavior around spanning inline code is exercised more thoroughly.
77-88: 🧹 Nitpick | 🔵 Trivial | 💤 Low valueAdd more cases or convert to a regular test.
This rstest has only one case. Either add variations (different list markers, indentation, multi-backtick fences) or convert to
#[test]to avoid rstest overhead for a single scenario.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@tests/wrap/spanning_code_spans.rs` around lines 77 - 88, The test rstest test_wrap_joins_unclosed_span_continuation currently declares a single #[case] and should either be expanded with additional cases or simplified to a plain unit test: either add more #[case] entries covering other markers/indentation/backtick scenarios and keep the #[rstest] signature (e.g., extra #[case] tuples passed into the function), or replace the #[rstest] attribute and #[case] parameters with a single #[test] function that constructs the input, calls wrap_text(&input, 80), and asserts the expected behavior; update/remove the #[case] annotations and function signature accordingly so the test compiles and exercises multiple scenarios or is a normal unit test.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/wrap.rs`:
- Around line 193-204: The code drops the hard_break value returned by
line_break_parts which loses explicit Markdown hard-breaks when closing a
buffered span (see functions line_break_parts, has_unclosed_code_span,
join_pending_continuation and writer.flush_paragraph and the PendingPrefix /
state.pending_prefix usage); modify PendingPrefix to carry the hard_break flag
(or, alternatively, when has_unclosed_code_span(pending.rest) becomes false,
first flush the pending span back into the main paragraph buffer and then
process the hard_break so writer.flush_paragraph sees the break, updating
join_pending_continuation/_rest handling as needed; add a regression test that
exercises a buffered code span ending with a hard break (example: "- `foo`
\nbar` \n`baz") to ensure the break is preserved.
---
Outside diff comments:
In `@tests/wrap/spanning_code_spans.rs`:
- Around line 90-98: The rstest test_wrap_defers_while_any_span_stays_open
currently supplies only one case and should either be expanded with additional
#[case] inputs or converted to a plain #[test]; update the test to include
multiple variations (e.g., multiple open spans, different leading prefixes,
escaped backticks) by adding more #[case] parameters to the function signature
or replace the #[rstest] attribute with #[test] and iterate through a small
vector of inputs that call wrap_text(&input, 80) and assert the same conditions
(presence of "`done`" and "`open span`" or their expected equivalents) so the
behavior around spanning inline code is exercised more thoroughly.
- Around line 77-88: The test rstest test_wrap_joins_unclosed_span_continuation
currently declares a single #[case] and should either be expanded with
additional cases or simplified to a plain unit test: either add more #[case]
entries covering other markers/indentation/backtick scenarios and keep the
#[rstest] signature (e.g., extra #[case] tuples passed into the function), or
replace the #[rstest] attribute and #[case] parameters with a single #[test]
function that constructs the input, calls wrap_text(&input, 80), and asserts the
expected behavior; update/remove the #[case] annotations and function signature
accordingly so the test compiles and exercises multiple scenarios or is a normal
unit test.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: fe5aede4-9125-4f75-9984-4eaf09f7d4e4
📒 Files selected for processing (5)
src/wrap.rssrc/wrap/tokenize/mod.rssrc/wrap/tokenize/scanning.rstests/wrap/spanning_code_spans.rstests/wrap_unit.rs
|
@coderabbitai Have the following now been resolved? tests/wrap/spanning_code_spans.rs (2)
🤖 Detailed instructionsVerify each finding against current code. Fix only still-valid issues, skip the In
🤖 Detailed instructionsVerify each finding against current code. Fix only still-valid issues, skip the In |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
cat tests/wrap/spanning_code_spans.rsLength of output: 3483
An additional test, |
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
|
@coderabbitai Please suggest a fix for the following concern and provide an AI coding agent prompt for the fix: PR introduces invariants over ranges (fence lengths, spans, escaping) requiring property-based testing, yet uses only hardcoded rstest cases without proptest strategies. | Add proptest properties for fence matching, span atomicity across arbitrary widths/line counts, and exact-length fence matching rejection of mismatches. |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/developers-guide.md`:
- Around line 156-159: The documentation incorrectly states that flush_paragraph
emits buffered text when either has_unclosed_code_span returns false for the
accumulated rest or the text ends with a Markdown hard break; update the wording
to match the implementation: describe that flush_paragraph only emits the
buffered segment after the code span closes (i.e., when has_unclosed_code_span
becomes false), and note that hard_break only affects the emission timing once
closure is detected; reference the functions has_unclosed_code_span,
flush_paragraph, and append_wrapped_with_prefix_width and reword the “or”
phrasing to indicate closure is required before append_wrapped_with_prefix_width
is called (hard_break influences only when closure has been observed).
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 64f317ec-b107-4853-b374-81d64bbf8763
📒 Files selected for processing (4)
docs/developers-guide.mdsrc/wrap.rssrc/wrap/tokenize/mod.rssrc/wrap/tokenize/scanning.rs
|
@coderabbitai Please suggest a fix for the following concern and provide an AI coding agent prompt for the fix: New tests use fixtures with manual assertions rather than snapshot tests; existing codebase uses insta for similar output validation (link_ref_snapshots.rs). Convert spanning_code_spans.rs fixtures to snapshot tests with insta::assert_snapshot!, matching the pattern in link_ref_snapshots.rs for text-based output testing. |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
echo "=== tests/wrap/spanning_code_spans.rs ==="
cat tests/wrap/spanning_code_spans.rs
echo ""
echo "=== tests/wrap/link_ref_snapshots.rs ==="
cat tests/wrap/link_ref_snapshots.rs
echo ""
echo "=== Cargo.toml dev-deps ==="
grep -A2 'insta\|proptest\|rstest' Cargo.tomlLength of output: 5217 🏁 Script executed: #!/bin/bash
echo "=== Snapshot files for spanning_code_span ==="
fd -e snap . tests/snapshots/ | grep spanning || echo "(none found)"
echo ""
echo "=== All snapshot files ==="
fd -e snap . tests/ | head -30Length of output: 2063
Specifically:
No agent prompt is required. ✅ |
This comment was marked as resolved.
This comment was marked as resolved.
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
docs/developers-guide.md (1)
144-162:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winWrap the pending-prefix deferral paragraph at 80 columns.
The paragraph from line 144 through line 162 violates the 80-column wrapping requirement for Markdown prose.
Reflow the paragraph to wrap at 80 columns. Run
make fmtafter making the change to ensure table markup and other formatting remain correct.Triage:
[type:syntax/md]As per coding guidelines: "Markdown paragraphs and bullet points must be wrapped at 80 columns."
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@docs/developers-guide.md` around lines 144 - 162, The Markdown paragraph describing pending prefix deferral exceeds the 80-column wrap limit; please reflow that block (the text referencing handle_prefix_line, has_unclosed_code_span, ParagraphState::pending_prefix/PendingPrefix, handle_pending_continuation in src/wrap.rs, join_pending_continuation, continuation_begins_with_closing_fence, flush_paragraph, append_wrapped_with_prefix_width, parse_open_code_span, and clear()) so all lines are ≤80 characters, preserving wording and references, then run `make fmt` to ensure tables/markup remain correct.
♻️ Duplicate comments (1)
docs/developers-guide.md (1)
157-162:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winClarify flush-condition semantics to match the implementation.
The text states "a deferred open span (detected by
parse_open_code_spanbefore the join) suppresses emission unless a pending Markdown hard break forces it," which implieshard_breakcan force emission whilst the span remains unclosed. The implementation (src/wrap/paragraph.rs:233-254) showsflush_paragraphonly emits oncehas_unclosed_code_spanreturns false. Rewrite to state thathard_breakaffects trailing-space emission after closure, not that it forces emission before closure.Triage:
[type:docstyle]As per coding guidelines: "Keep the developer's guide synchronised with decision records, roadmap items, and the codebase, as a stale developer's guide is worse than a shorter one."
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@docs/developers-guide.md` around lines 157 - 162, Update the paragraph to match the implementation: clarify that a deferred open span (detected by parse_open_code_span) prevents flush_paragraph from emitting until the span is closed (flush_paragraph checks has_unclosed_code_span and only emits after closure), and that hard_break only controls whether two trailing spaces are appended after the paragraph is emitted (i.e., it affects trailing-space emission after closure), not that hard_break forces emission while a code span remains unclosed; also mention that ParagraphState.clear() resets pending_prefix to None as before.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@tests/wrap_unit.rs`:
- Around line 423-464: The proptest property block (the proptest! tests
referencing has_unclosed_code_span and wrap_text) must be moved out of the
oversized tests/wrap_unit.rs into a new test file to meet the 400-line rule;
create a new test module (e.g., tests/wrap_properties.rs) that imports
proptest::prelude::* and mdtablefix::wrap::{has_unclosed_code_span, wrap_text},
paste the entire proptest! { ... } block there, remove the original block from
tests/wrap_unit.rs, and run cargo test to ensure the new file is auto-discovered
(or add a mod declaration if your test harness requires it).
---
Outside diff comments:
In `@docs/developers-guide.md`:
- Around line 144-162: The Markdown paragraph describing pending prefix deferral
exceeds the 80-column wrap limit; please reflow that block (the text referencing
handle_prefix_line, has_unclosed_code_span,
ParagraphState::pending_prefix/PendingPrefix, handle_pending_continuation in
src/wrap.rs, join_pending_continuation, continuation_begins_with_closing_fence,
flush_paragraph, append_wrapped_with_prefix_width, parse_open_code_span, and
clear()) so all lines are ≤80 characters, preserving wording and references,
then run `make fmt` to ensure tables/markup remain correct.
---
Duplicate comments:
In `@docs/developers-guide.md`:
- Around line 157-162: Update the paragraph to match the implementation: clarify
that a deferred open span (detected by parse_open_code_span) prevents
flush_paragraph from emitting until the span is closed (flush_paragraph checks
has_unclosed_code_span and only emits after closure), and that hard_break only
controls whether two trailing spaces are appended after the paragraph is emitted
(i.e., it affects trailing-space emission after closure), not that hard_break
forces emission while a code span remains unclosed; also mention that
ParagraphState.clear() resets pending_prefix to None as before.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: d2540caa-42cb-4efb-94ec-3f62d6f8b5dd
⛔ Files ignored due to path filters (2)
tests/snapshots/spanning_code_span_-.snapis excluded by!**/*.snaptests/snapshots/spanning_code_span_1_.snapis excluded by!**/*.snap
📒 Files selected for processing (4)
.gitignoredocs/developers-guide.mdtests/wrap/spanning_code_spans.rstests/wrap_unit.rs
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@tests/wrap_properties.rs`:
- Around line 101-113: The test
continuation_begins_with_closing_fence_rejects_length_mismatch only checks
longer closing fences; update it to exercise both longer and shorter mismatched
fences by constructing two variants: one with close_fence_long = "`".repeat(n +
delta) (keep the existing assertion) and, when n > delta, also build
close_fence_short = "`".repeat(n - delta) and assert
continuation_begins_with_closing_fence(&existing,
&format!("{close_fence_short}{suffix}")) is false; reference the test function
continuation_begins_with_closing_fence_rejects_length_mismatch and the helper
function continuation_begins_with_closing_fence to locate the code. Ensure you
only create the short-fence case when n > delta to avoid zero-length fences.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: a3b039a8-2500-4a0c-a8d1-a91a1dffb3d4
📒 Files selected for processing (3)
src/wrap.rstests/wrap_properties.rstests/wrap_unit.rs
💤 Files with no reviewable changes (1)
- tests/wrap_unit.rs
|
Actionable comments posted: 0 |
|
@coderabbitai Please suggest a fix for the following concern and provide an AI coding agent prompt for the fix: | Testing (Property / Proof) | |
|
@coderabbitai Please suggest a fix for the following concern and provide an AI coding agent prompt for the fix: | Performance And Resource Use | |
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
`apply_continuation_chunk` was walking the continuation chunk twice for its opening backtick run: once via `continuation_needs_leading_space` to derive the offset, and again inside `join_pending_continuation` when deciding whether to insert a separating space. Both call sites operated on the same `text`, so the second scan was redundant. Compute `tokenize::opening_fence_run_len(text.as_bytes(), text)` once in `apply_continuation_chunk` and thread the resulting `Option<usize>` into a renamed `join_pending_continuation` and into a small `leading_run_needs_space` helper that replaces `continuation_needs_leading_space`. The behaviour is unchanged: the comparison `run_len != open_fence_len` and the `None ⇒ true` fallback both move into the helper, and `join_pending_continuation` consults the same value rather than rescanning. Also adopt en-GB Oxford `-ize` spelling in the module docstring and the `update_span_state` comment: "synthesises"/"synthesise" become "synthesizes"/"synthesize" so the comments match the en-GB-oxendict guideline in `AGENTS.md`. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
src/wrap/continuation.rs (1)
196-209:⚠️ Potential issue | 🟠 Major | ⚡ Quick winKeep the reopened span live instead of synthesizing a closer.
Return
ClosedAndReopenedhere rather than appending a synthetic fence and clearingopen_fence_len. Line 207 manufactures a closer, but Line 208 drops the only state that can consume the real closing fence from the next continuation, so that next chunk is joined back as literal text or a fresh opener. That reintroduces the duplicated/orphaned backtick path for cases such as`4.1.1`split across lines.Suggested change
- if let Some((_, new_len)) = - split_reopen_span(continuation, continuation_offset, raw_fence) - { - pending.rest.push_str(&"`".repeat(new_len)); - pending.open_fence_len = None; - return SpanStateUpdate::StillOpen; - } + if let Some((split_at, new_len)) = + split_reopen_span(continuation, continuation_offset, raw_fence) + { + return SpanStateUpdate::ClosedAndReopened { split_at, new_len }; + }Based on learnings: "Inline code spans, Markdown links, and GFM footnote references must be atomic fragments that are never split across lines and move as a unit when they would overflow the target width."
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/wrap/continuation.rs` around lines 196 - 209, The code currently detects a reopened span via split_reopen_span(continuation, continuation_offset, raw_fence) but synthesizes a closing fence by appending to pending.rest and clears pending.open_fence_len before returning SpanStateUpdate::StillOpen; instead, preserve the reopened span state so the real closer in the next continuation can be consumed: remove the synthetic fence append and do not clear pending.open_fence_len, and return SpanStateUpdate::ClosedAndReopened (replace the StillOpen return) when split_reopen_span returns Some, so the reopened span remains live and the next chunk can close it properly.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Outside diff comments:
In `@src/wrap/continuation.rs`:
- Around line 196-209: The code currently detects a reopened span via
split_reopen_span(continuation, continuation_offset, raw_fence) but synthesizes
a closing fence by appending to pending.rest and clears pending.open_fence_len
before returning SpanStateUpdate::StillOpen; instead, preserve the reopened span
state so the real closer in the next continuation can be consumed: remove the
synthetic fence append and do not clear pending.open_fence_len, and return
SpanStateUpdate::ClosedAndReopened (replace the StillOpen return) when
split_reopen_span returns Some, so the reopened span remains live and the next
chunk can close it properly.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 755c84d3-d024-4490-90b6-16f03004d348
📒 Files selected for processing (1)
src/wrap/continuation.rs
`join_pending_continuation` moved from `src/wrap.rs` to `src/wrap/continuation.rs` in commit e8d33ac, but the key-types table still pointed at the old location. The new module — which owns the join/update/dispatch state machine for soft-wrapped continuations — was undocumented, and the prose paragraph on pending-prefix deferral did not mention `apply_continuation_chunk` as the entry point. Fix the file location on the existing `join_pending_continuation` row, add an `apply_continuation_chunk` row above it with a one-line description, and expand the deferral paragraph to record that `handle_pending_continuation` delegates each soft-wrapped chunk to `apply_continuation_chunk` in the new module, that the helper drives a `SpanStateUpdate` (`StillOpen`, `ClosedAndReopened`, `Flush`), and that a same-chunk close-and-reopen synthesizes a closer for the new span so it stays atomic in the buffer. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
@coderabbitai Have the following now been resolved? Please address the following concerns and ensure all commit gates succeed:
|
This comment was marked as resolved.
This comment was marked as resolved.
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
|
@coderabbitai Have the following failed checks now been resolved? If further work is required, please provide an AI agent prompt for the remaining work to be done to address these failures. Do not treat warnings as optional or aspirational. Where a change is out of scope for this PR, propose a GitHub issue unless one exists already. The developers-guide.md lists |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
echo "=== docs/developers-guide.md — Key types table and continuation module docs ==="
fd -i 'developers-guide.md' --exec cat {}
echo ""
echo "=== src/wrap/continuation.rs — module-level doc and exported functions ==="
cat src/wrap/continuation.rsLength of output: 37697
One carry-over item from the previous round remains outstanding: |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/developers-guide.md`:
- Line 282: Update the documentation entry for apply_continuation_chunk by
changing the word "Centralised" to "Centralized" in the descriptive text that
reads "Centralised join/update/dispatch entry point that reconciles a single
continuation chunk with the active `PendingPrefix` buffer." Ensure the corrected
spelling appears in the line mentioning `apply_continuation_chunk` and the file
reference `src/wrap/continuation.rs`.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 3641ca41-7995-4a21-8d92-f2ffe8aa6604
📒 Files selected for processing (1)
docs/developers-guide.md
|
@coderabbitai pause |
✅ Actions performedReviews paused. |
"Centralised" → "Centralized" in the apply_continuation_chunk row, consistent with the project's -ize suffix convention throughout. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Summary
Closes #297
Reflow no longer wraps prefixed lines while an inline code span remains open
across soft-wrapped source lines. Continuations (including blockquote
>lines)are buffered until the span closes, then wrapped as one atomic segment so
closing backticks stay on the same line as their content.
has_unclosed_code_spanto mirror tokenizer backtick matching.PendingPrefixdeferral in the wrap orchestrator.4.1.1).footnote cases.
Test plan
make check-fmtmake lintmake testcoderabbit review --agent(0 findings)scan_code_spansguard viaassert_wrapped_list_item