(row: string, continuation: string)
| 194 | } |
| 195 | |
| 196 | function appendTableContinuation(row: string, continuation: string): string { |
| 197 | const trimmedRow = row.trimEnd() |
| 198 | const trimmedContinuation = continuation.trim() |
| 199 | const rowCells = splitPipeCells(trimmedRow) |
| 200 | const continuationCells = splitPipeCells(trimmedContinuation) |
| 201 | const needsMissingSeparator = |
| 202 | !trimmedRow.endsWith('|') && |
| 203 | rowCells.length > 0 && |
| 204 | continuationCells.length > 1 |
| 205 | |
| 206 | return needsMissingSeparator |
| 207 | ? `${trimmedRow} | ${trimmedContinuation}` |
| 208 | : `${trimmedRow} ${trimmedContinuation}` |
| 209 | } |
| 210 | |
| 211 | function closeRepairedTableRow(row: string): string { |
| 212 | return row.trimEnd().endsWith('|') ? row.trimEnd() : `${row.trimEnd()} |` |
no test coverage detected