(existingContent: string)
| 2646 | } |
| 2647 | |
| 2648 | function extractManualContent(existingContent: string): Record<string, string> { |
| 2649 | const manualSections: Record<string, string> = {} |
| 2650 | const manualContentRegex = |
| 2651 | /\{\/\*\s*MANUAL-CONTENT-START:(\w+)\s*\*\/\}([\s\S]*?)\{\/\*\s*MANUAL-CONTENT-END\s*\*\/\}/g |
| 2652 | |
| 2653 | let match |
| 2654 | while ((match = manualContentRegex.exec(existingContent)) !== null) { |
| 2655 | const sectionName = match[1] |
| 2656 | const content = match[2].trim() |
| 2657 | manualSections[sectionName] = content |
| 2658 | } |
| 2659 | |
| 2660 | return manualSections |
| 2661 | } |
| 2662 | |
| 2663 | function mergeWithManualContent( |
| 2664 | generatedMarkdown: string, |
no outgoing calls
no test coverage detected