(lines: readonly string[])
| 18 | const markerPattern = /^\s*\/\/ docs:(start|end) ([a-z0-9-]+)\s*$/; |
| 19 | |
| 20 | const dedent = (lines: readonly string[]): string => { |
| 21 | const nonBlank = lines.filter((line) => line.trim().length > 0); |
| 22 | const indent = Math.min( |
| 23 | ...nonBlank.map((line) => { |
| 24 | const match = line.match(/^\s*/); |
| 25 | return match?.[0].length ?? 0; |
| 26 | }), |
| 27 | ); |
| 28 | |
| 29 | return lines |
| 30 | .map((line) => line.slice(indent)) |
| 31 | .join("\n") |
| 32 | .trim(); |
| 33 | }; |
| 34 | |
| 35 | for (const source of sources) { |
| 36 | const text = await Bun.file(source.source).text(); |
no outgoing calls
no test coverage detected