(event: SectionRenderItem | SectionTextBlock)
| 336 | }; |
| 337 | |
| 338 | export function formatSectionEvent(event: SectionRenderItem | SectionTextBlock): string { |
| 339 | const icon = event.icon ? `${SECTION_ICON_MAP[event.icon]} ` : ''; |
| 340 | const headerLine = `${icon}${event.title}`; |
| 341 | if (event.lines.length === 0) { |
| 342 | return headerLine; |
| 343 | } |
| 344 | const indent = event.icon ? ' ' : ' '; |
| 345 | const indented = event.lines.map((line) => (line === '' ? '' : `${indent}${line}`)); |
| 346 | const lines = [headerLine]; |
| 347 | if (event.blankLineAfterTitle) { |
| 348 | lines.push(''); |
| 349 | } |
| 350 | lines.push(...indented); |
| 351 | return lines.join('\n'); |
| 352 | } |
| 353 | |
| 354 | export function formatTableEvent(event: TableRenderItem | TableTextBlock): string { |
| 355 | const lines: string[] = []; |
no test coverage detected