()
| 60 | let currentContent: string[] = [] |
| 61 | |
| 62 | function finalizeCell() { |
| 63 | if (currentCell) { |
| 64 | // For markdown cells, strip the '# ' prefix from each line |
| 65 | if (currentCell.cellType === 'markdown') { |
| 66 | currentCell.content = currentContent |
| 67 | .map(line => { |
| 68 | if (line.startsWith('# ')) { |
| 69 | return line.slice(2) |
| 70 | } |
| 71 | if (line === '#') { |
| 72 | return '' |
| 73 | } |
| 74 | return line |
| 75 | }) |
| 76 | .join('\n') |
| 77 | .trim() |
| 78 | } else { |
| 79 | currentCell.content = currentContent.join('\n').trim() |
| 80 | } |
| 81 | cells.push(currentCell) |
| 82 | } |
| 83 | currentContent = [] |
| 84 | } |
| 85 | |
| 86 | for (const line of lines) { |
| 87 | const match = cellMarkerRegex.exec(line) |
no outgoing calls
no test coverage detected