Build a complete new learnings section (heading + markers + content).
(learnings_markdown: &str)
| 480 | |
| 481 | /// Build a complete new learnings section (heading + markers + content). |
| 482 | fn build_new_section(learnings_markdown: &str) -> String { |
| 483 | let mut section = String::new(); |
| 484 | section.push_str(SECTION_HEADING); |
| 485 | section.push('\n'); |
| 486 | section.push('\n'); |
| 487 | section.push_str(SECTION_NOTE); |
| 488 | section.push('\n'); |
| 489 | section.push('\n'); |
| 490 | section.push_str(SECTION_START); |
| 491 | section.push('\n'); |
| 492 | section.push('\n'); |
| 493 | section.push_str(learnings_markdown); |
| 494 | section.push_str(SECTION_END); |
| 495 | section.push('\n'); |
| 496 | section |
| 497 | } |
| 498 | |
| 499 | /// Collect new learnings as heading → items map for merging. |
| 500 | fn collect_new_items(learnings: &Learnings) -> HashMap<String, Vec<String>> { |