( blocks: ContentBlock[], planContent: string, )
| 59 | } |
| 60 | |
| 61 | export const insertPlanBlock = ( |
| 62 | blocks: ContentBlock[], |
| 63 | planContent: string, |
| 64 | ): ContentBlock[] => { |
| 65 | const cleanedBlocks = scrubPlanTagsInBlocks(blocks) |
| 66 | return [ |
| 67 | ...cleanedBlocks, |
| 68 | { |
| 69 | type: 'plan', |
| 70 | content: planContent, |
| 71 | }, |
| 72 | ] |
| 73 | } |
| 74 | |
| 75 | /** |
| 76 | * Recursively collapses blocks that weren't manually opened by the user. |
no test coverage detected