Document code span wrapping improvements and frontmatter docs - #272
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (1)
Documentation updates for inline code span wrapping and YAML frontmatterThis pull request updates documentation to describe improved inline code-span wrapping behaviour and clarifies YAML frontmatter preservation. The changes are documentation-only and add a regression test; they do not modify the formatter’s runtime behaviour. New document
Documentation updates
Tests
Implementation status and relation to issue
|
| Cohort / File(s) | Summary |
|---|---|
Changelog & docs CHANGELOG.md, docs/architecture.md |
Add a "Fixed" changelog entry referencing issue #252. Expand architecture description to state punctuation groups only when immediately following an inline code span and explicitly allow breaks between space-separated code spans. |
Documentation formatting docs/execplans/yaml-frontmatter.md |
Reformat three ## Risks entries from inline Severity: ... Likelihood: ... Mitigation: ... lines into nested bullet lists with proper line breaks and indentation. |
Tests src/wrap/tests.rs |
Add a unit test asserting wrap_text permits line breaks between backticked, space-separated code spans and enforces a maximum display width of 80 columns. |
Poem
Space-separated spans no longer cling,
Break where the gentle spaces sing,
Punctuation bonds only when near,
Lines unfurl and breathe, sincere. ✨
🚥 Pre-merge checks | ✅ 5 | ❌ 4
❌ Failed checks (3 warnings, 1 inconclusive)
| Check name | Status | Explanation | Resolution |
|---|---|---|---|
| Testing | The PR adds only a unit test for code span wrapping, validating width constraints at a single breakpoint. However, the custom check requires snapshot tests for text-based output changes and property-based testing across input bounds. | Create integration tests with reference input/output files in tests/data/ and add property-based testing using proptest across column widths 40–120. Introduce snapshot tests using insta for multi-line output validation. | |
| User-Facing Documentation | The custom check requires user-facing functionality documented in docs/users-guide.md, which does not exist. The README.md fails to document the new inline code span wrapping behaviour introduced by this PR (issue #252). |
Update README.md to document the new wrapping behaviour for inline code spans, or create docs/users-guide.md and update the check reference accordingly. | |
| Developer Documentation | PR documents inline code punctuation wrapping improvement in CHANGELOG.md and docs/architecture.md with regression test in src/wrap/tests.rs, but fails to document the architectural change in docs/developers-guide.md as required. | Add section to docs/developers-guide.md documenting inline code punctuation handling architecture, explaining trailing punctuation coupling and whitespace wrapping rules, referencing issue #252 for design context. |
|
| Module-Level Documentation | ❓ Inconclusive | Cannot verify module-level and public function documentation standards as the modified src/wrap/tests.rs file is inaccessible. | Provide the complete content of src/wrap/tests.rs to verify whether the module carries appropriate docstrings and the new test function meets documentation requirements. |
✅ Passed checks (5 passed)
| Check name | Status | Explanation |
|---|---|---|
| Title check | ✅ Passed | The title accurately describes the primary changes: documenting code span wrapping improvements and YAML frontmatter documentation updates. |
| Description check | ✅ Passed | The description comprehensively relates to the changeset, covering documentation updates, test additions, and validation plans aligned with the changes. |
| Linked Issues check | ✅ Passed | The PR addresses issue #252 by documenting the refined wrapping behaviour and adding a regression test verifying that wrapping occurs between space-separated code spans, satisfying the primary objective. |
| Out of Scope Changes check | ✅ Passed | All changes remain within scope: documentation updates, CHANGELOG entry, architectural notes, and a regression test directly supporting the inline code-span wrapping improvements and frontmatter preservation. |
| Docstring Coverage | ✅ Passed | Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. |
✏️ Tip: You can configure your own custom pre-merge checks in the settings.
✨ Finishing Touches
📝 Generate docstrings
- Create stacked PR
- Commit on current branch
🧪 Generate unit tests (beta)
- Create PR with unit tests
- Commit unit tests in branch
fix-inline-code-span-wrapping-g4jg6o
Comment @coderabbitai help to get the list of available commands and usage tips.
Reviewer's GuideThis PR refreshes documentation to describe the new inline code span wrapping behavior and YAML frontmatter preservation, while also fixing code fence syntax, table alignment, and prose for consistency with current formatter behavior. Sequence diagram for formatting Markdown with YAML frontmattersequenceDiagram
actor User
participant CLI as CLI_main
participant Splitter as FrontmatterSplitter
participant Proc as ProcessModule
participant Renumber as RenumberLists
participant Breaks as FormatBreaks
participant Out as Output
User->>CLI: mdtablefix --wrap --breaks --in-place file.md
CLI->>Splitter: split_frontmatter(input)
Splitter-->>CLI: prefix, body
CLI->>Proc: process_stream_opts(body, options)
Proc-->>CLI: formatted_body
CLI->>Renumber: renumber_lists(formatted_body)
Renumber-->>CLI: body_after_renumber
CLI->>Breaks: format_breaks(body_after_renumber)
Breaks-->>CLI: body_after_breaks
CLI->>Out: combine(prefix, body_after_breaks)
Out-->>User: write formatted file (prefix preserved byte_for_byte)
File-Level Changes
Assessment against linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
Clarify that trailing punctuation still couples to inline code while\nspaces between separate code spans remain valid wrap points.\n\nUpdate the changelog for the wrapping fix tracked in issue #252,\nand keep the Markdown files in formatter-normalized form after\nrunning the required documentation gates.\n\ncloses #252
Restore the YAML frontmatter execplan risk entries to a\nscan-friendly structure by splitting severity, likelihood, and\nmitigation into nested bullets.\n\nThis addresses the code review feedback without changing the\nunderlying risk content.
There was a problem hiding this comment.
Actionable comments posted: 5
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@CHANGELOG.md`:
- Around line 20-22: Remove the unimplemented change from the "Fixed" section by
deleting the line block that reads "Allow wrapping between space-separated
inline code spans instead of treating the full sequence as a single unbreakable
unit. ([`#252`](https://github.com/leynos/mdtablefix/issues/252))" from
CHANGELOG.md so the release notes only reflect actual code changes; keep the
rest of the changelog intact and save the updated file for the release,
re-adding this entry only when the wrapping implementation (issue `#252`) is
implemented in a separate PR.
In `@docs/architecture.md`:
- Around line 444-449: The paragraph starting "This grouping is deliberately
narrow." in docs/architecture.md asserts a formatter behavior that isn't
implemented; either remove that paragraph entirely or change its language to
future/conditional tense (e.g., "will remain a valid break opportunity" or "is
planned to") and add a brief note that the behavior is pending until the
formatter changes are merged; update the sentences that reference examples like
`.toml`, `.json`, `.json5`, `.yaml`, and `.yml` accordingly so the doc no longer
states the behavior as already implemented.
In `@docs/execplans/yaml-frontmatter.md`:
- Around line 120-125: The two wrapped decision log entries are missing terminal
periods; add a full stop at the end of the "Decision: treat unmatched opening
delimiters as ordinary Markdown instead of partially shielding the document"
entry and also add a full stop to the "Date/Author: 2026-04-05 22:45Z / Droid"
entry so both sentences terminate with punctuation and match the document's
prose style.
- Around line 264-265: Remove the conditional skip path that allows skipping
"make nixie" from the validation steps and ensure "make nixie" remains listed as
a required validator in the document’s final checklist; specifically edit the
section referencing "If `docs/architecture.md` does not change any Mermaid
content, `make nixie` may be skipped." to delete that sentence and update the
final checklist so it unambiguously requires running "make nixie" for `**/*.md`
Mermaid validation.
In `@docs/rust-doctest-dry-guide.md`:
- Line 109: Rewrap the Markdown paragraph containing the text 'specifier for
clarity.[^3] A doctest "passes" when it compiles and runs without' so no line
exceeds 80 characters; split the sentence into multiple lines at natural word
boundaries (e.g., after punctuation or between clauses) while preserving the
exact wording and Markdown punctuation and keeping inline references like [^3]
and quoted text intact.
🪄 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
Run ID: 200fe043-0c87-4b6f-897e-14fc5ba15339
📒 Files selected for processing (6)
CHANGELOG.mddocs/architecture.mddocs/documentation-style-guide.mddocs/execplans/yaml-frontmatter.mddocs/rust-doctest-dry-guide.mddocs/rust-testing-with-rstest-fixtures.md
12322c3 to
d8ef636
Compare
Add a top-level regression covering the exact\nspace-separated inline code-span series from issue #252.\n\nThe underlying wrapping logic is already fixed in the current code,\nso this change locks in the user-facing behaviour at the public\nentry point as well as the lower-level helper coverage.\n\ncloses #252
There was a problem hiding this comment.
♻️ Duplicate comments (1)
CHANGELOG.md (1)
20-22:⚠️ Potential issue | 🔴 CriticalRemove this unreleased fix claim now.
Delete Line 20-Line 22 from Fixed until the formatter change for issue
#252lands in code. Keep changelog entries tied to implemented runtime behaviour only.Triage:
[type:docstyle]🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@CHANGELOG.md` around lines 20 - 22, Remove the unreleased claim from the "Fixed" changelog: delete the entry that reads "Allow wrapping between space-separated inline code spans instead of treating the full sequence as a single unbreakable unit. ([`#252`](https://github.com/leynos/mdtablefix/issues/252))" from the "Fixed" section so CHANGELOG.md only lists implemented behavior; leave the rest of the document intact and add the entry back only when the formatter change for issue `#252` is merged and released.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Duplicate comments:
In `@CHANGELOG.md`:
- Around line 20-22: Remove the unreleased claim from the "Fixed" changelog:
delete the entry that reads "Allow wrapping between space-separated inline code
spans instead of treating the full sequence as a single unbreakable unit.
([`#252`](https://github.com/leynos/mdtablefix/issues/252))" from the "Fixed"
section so CHANGELOG.md only lists implemented behavior; leave the rest of the
document intact and add the entry back only when the formatter change for issue
`#252` is merged and released.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: 238dc0a0-da1a-4026-abc8-d60ae3f89df2
📒 Files selected for processing (3)
CHANGELOG.mddocs/architecture.mddocs/execplans/yaml-frontmatter.md
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed: Length of output: 555 🏁 Script executed: Length of output: 1664 🏁 Script executed: Length of output: 19856
Inspecting (SpanKind::Code, Some(next)) if next.chars().all(is_trailing_punct) => true,It does not couple whitespace when the following token is another inline code span, so The regression test locks in that behaviour at the public |
|
@coderabbitai Have the following now been resolved?
|
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed: Length of output: 12986
- Risk: frontmatter might still be modified by CLI-only transforms …
- Severity: high
- Likelihood: medium
- Mitigation: protect the body split at the highest shared pipeline boundary …All three risk entries follow this structure, so |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@src/wrap/tests.rs`:
- Around line 275-280: The test uses a backslash-continued string literal for
the paragraph in the variable `input`; replace that with an explicit
concatenation using Rust's concat!() so spacing is explicit and stable (e.g.,
build the long paragraph via concat!("The file loader selects the parser based
on the extension (", ".toml", ... )). Update the `input` Vec entry to use
concat!() to join the pieces into a single String literal and remove the
trailing backslash line continuations.
🪄 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
Run ID: c3f1b0cc-fa85-4b77-8882-b2cba3d474b3
📒 Files selected for processing (1)
src/wrap/tests.rs
Replace the backslash-continued string literal in the wrap\nregression test with so the paragraph spacing is\nexplicit and stable.
Summary
Changes
Documentation updates
Tests
Other
Validation plan
Notes
◳ Generated by DevBoxer ◰
ℹ️ Tag @devboxerhub to ask questions and address PR feedback
📎 Task: https://www.devboxer.com/task/87009be1-c153-4fa1-866d-a004768bf44f
📝 Closes #252
Summary by Sourcery
Update documentation to reflect refined inline code-span wrapping behavior and YAML frontmatter preservation while aligning existing docs and examples with current formatting rules.
Documentation: