( templateContent: string, taskData: TemplateData | ICSTemplateData )
| 43 | taskData: ICSTemplateData |
| 44 | ): ProcessedTemplate; |
| 45 | export function processTemplate( |
| 46 | templateContent: string, |
| 47 | taskData: TemplateData | ICSTemplateData |
| 48 | ): ProcessedTemplate { |
| 49 | const sections = parseTemplateSections(templateContent); |
| 50 | |
| 51 | const processedFrontmatter = sections.frontmatter |
| 52 | ? processTemplateFrontmatter(sections.frontmatter, taskData) |
| 53 | : {}; |
| 54 | |
| 55 | const processedBody = processTemplateBody(sections.body, taskData); |
| 56 | |
| 57 | return { |
| 58 | frontmatter: processedFrontmatter, |
| 59 | body: processedBody, |
| 60 | }; |
| 61 | } |
| 62 | |
| 63 | /** |
| 64 | * Parse template into frontmatter and body sections |
no test coverage detected