Repository navigation
Files: opening an RTF outline keeps non-breaking hyphens - #1317
Conversation
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Map and test the RTF hyphen crates/format/src/rtf.rs |
The control-symbol handler maps \_ to U+2011. A test checks that importing Year\_end review preserves the character in the outline text. |
Priority:
Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Bug fix · Severity of issue fixed: Low
Possibly related PRs
- storytold/deckcraft#1260: This PR adds handling and a test to the RTF outline reader introduced by that PR.
Suggested reviewers: aiongg
Merge Risk: 
Minimal · up to 1525d
-
The RTF import change is sound and has no identified merge-blocking risk.
Architecture risk: 
Medium · up to 1525d
-
The change affects 1 system.
Changed systems:
cratesArchitecture concerns
No architecture-level concerns identified.Review details
-
Systems and components
- observed — crates (service) was modified; 1 changed file maps to changed impact.
Before / after behavior
- observed — Modified behavior in crates/format/src/rtf.rs: The RTF control-symbol handler now converts
\_to U+2011; previously it had no case for this symbol. - observed — Modified behavior in crates/format/src/rtf.rs: Added a test asserting that importing
Year\_end reviewpreserves the non-breaking hyphen in the outline text.
Reliability and maintainability
- inferred — Risk-relevant change factors for crates: blast_radius_1; direct_dependents_1
-
Pre-merge checks: 
5
-
Full details: Linked Issues check
-
Explanation
Issue
#1316requiresrtf_to_outlineto preserve the RTF control symbol\_as U+2011. The PR summary states thatcrates/format/src/rtf.rsnow maps\_to U+2011. The addedrtf::tests::non_breaking_hyphen_is_kepttest covers the reported input and expected output. The reported focused test passes.
Full details: Out of Scope Changes check
-
Explanation
The reported changes add only the
\_import behavior and its regression test incrates/format/src/rtf.rs. These changes directly support issue#1316. No unrelated changes are reported. The repository diff was unavailable, so this assessment relies on the supplied change summary.
-
Finishing Touches
-
🧪 Generate unit tests (beta)
-
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Comment @coderabbitai help to get the list of available commands.
|
Landed on main — thank you for the contribution! If you haven't already, come join us on Discord: https://discord.gg/artcraft |
Fixes #1316.
\_is RTF's non-breaking hyphen, a visible character like the non-breaking space\~, but the outline reader only knew\~and dropped\_. It now reads it as U+2011 (non-breaking hyphen), next to\~. The export already writes U+2011 back as\u8209?, so the text round-trips.Validation:
rtf::tests::non_breaking_hyphen_is_kept: fails on main ("Yearend review\n"), passes herecargo test --workspace --lib -- rtf::(deckcraft-format: 6 passed)cargo clippy --workspace --all-targets -- -D warnings,cargo fmt --all -- --checkSummary by CodeRabbit
\_now displays as a non-breaking hyphen in outline text.