The `**` `**` section, header through the line before the next file header.
(text: string, file: string)
| 45 | |
| 46 | /** The `**`<file>`**` section, header through the line before the next file header. */ |
| 47 | function sectionFor(text: string, file: string): string { |
| 48 | const lines = text.split('\n'); |
| 49 | const start = lines.findIndex((l) => l.startsWith(`**\`${file}\`**`)); |
| 50 | if (start < 0) return ''; |
| 51 | let end = lines.length; |
| 52 | for (let i = start + 1; i < lines.length; i++) { |
| 53 | if (lines[i]!.startsWith('**`')) { end = i; break; } |
| 54 | } |
| 55 | return lines.slice(start, end).join('\n'); |
| 56 | } |
| 57 | |
| 58 | /** `n` filler statements, each a distinct line so nothing dedups or folds. */ |
| 59 | function filler(tag: string, n: number, indent = ' '): string { |
no test coverage detected