Read the block nodes back, and stop a marker change splitting a list
CI / gate (push) Successful in 8s

This commit is contained in:
2026-09-01 17:58:29 +02:00
parent 32654121fd
commit 2527d1e3d8
26 changed files with 282 additions and 83 deletions
+3 -2
View File
@@ -1,5 +1,6 @@
import type { AdfNode } from '../../adf/document.ts'
import { carriesOnly } from '../../adf/document.ts'
import { spellPipeDelimiter, spellPipeRow } from '../pipe-table-syntax.ts'
import { tryPipeCell } from './inline-line.ts'
import type { ConvertErrorPath } from '../../result.ts'
@@ -15,8 +16,8 @@ export function tryPipeTable(node: AdfNode, path: ConvertErrorPath): string | un
if (line === undefined) return undefined
cells.push(line)
}
lines.push(`| ${cells.join(' | ')} |`)
if (rowIndex === 0) lines.push(`| ${cells.map(() => '---').join(' | ')} |`)
lines.push(spellPipeRow(cells))
if (rowIndex === 0) lines.push(spellPipeDelimiter(cells.length))
}
return lines.join('\n')
}