Repository navigation
Files: saving as Outline/RTF keeps every paragraph of a slide title - #1319
Conversation
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Export and verify title paragraphs crates/format/src/rtf.rs |
slides_to_rtf writes all non-empty title paragraphs in one outline paragraph, separated by \line, and retains the slide-title fallback. The regression test checks the separators and round-trip outline. |
Priority:
Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Bug fix · Severity of issue fixed: Medium
Possibly related PRs
- storytold/deckcraft#1260: This PR introduced the RTF export code that this change updates.
Suggested reviewers: nikitkara
Merge Risk: 
Minimal · up to 9e9e1
-
The RTF title export change is ready to merge with no concrete blocking risk identified.
Architecture risk: 
Medium · up to 9e9e1
-
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:
slides_to_rtfreplaces selecting only the first non-empty title paragraph with iteration over all non-empty title paragraphs, separated by\line; it retains the slide-title fallback when none are present. - observed — Modified behavior in crates/format/src/rtf.rs: Adds a test that appends a second title paragraph and checks that export separates both title paragraphs with
\linewhile the imported outline matches the presentation outline.
Reliability and maintainability
- inferred — Risk-relevant change factors for crates: blast_radius_2; direct_dependents_2
-
Pre-merge checks: 
4 · 
1
-
Failed checks: 1 warning Passed checks: 4 passed-
Full details: Linked Issues check
-
Explanation
Issue
#1318requires all title paragraphs to remain in one Outline/RTF paragraph. The change iterates over every non-empty title paragraph, preserves each paragraph's runs throughruns, and inserts\\lineinstead of\\par. The regression test verifies both title lines and the outline round trip.
Full details: Out of Scope Changes check
-
Explanation
The changes are limited to
crates/format/src/rtf.rs. The implementation directly fixes issue#1318, and the added test verifies the required export and round-trip behavior. No unrelated change is shown.
-
-
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 #1318.
slides_to_rtfwrote only the first non-empty paragraph of a slide title, so the rest of a two-paragraph title was lost in the Outline/RTF file. It now writes every non-empty title paragraph, keeping their bold/italic/underline runs, joined with\lineinside the one level-0 paragraph: a\parwould make each line a slide of its own when the file is opened again. Read back,\linebecomes a space, so the RTF reopens to the same outline the plain-text export writes ("First line Second line"). I could not check what PowerPoint itself writes for a multi-paragraph title in its Outline/RTF export;\lineis the one join that keeps the title a single outline entry on re-import.Validation:
rtf::tests::every_title_paragraph_is_exported: fails on main (the RTF has onlyFirst line\b0\par), passes herecargo test --workspace --lib -- rtf::(deckcraft-format: 6 passed)cargo clippy --workspace --all-targets -- -D warnings,cargo fmt --all -- --checkSummary by CodeRabbit