mirror of
https://github.com/larvit/adf-codec.git
synced 2026-11-19 06:35:44 +01:00
Answer architecture round 2: every builder joins its pieces through one bounded join, the readers take the engine guard, every refusal stands at the document's path, and a portable list's refusal names its own place
This commit is contained in:
@@ -36,12 +36,17 @@ export function pipeCells(line: string): string[] | undefined {
|
||||
return claimsPipeLine(line) ? splitPipeCells(line, 1) : undefined
|
||||
}
|
||||
|
||||
export function spellPipeDelimiter(columns: number): string {
|
||||
return spellPipeRow(Array.from({ length: columns }, () => '---'))
|
||||
export function delimiterCells(columns: number): string[] {
|
||||
return Array.from({ length: columns }, () => '---')
|
||||
}
|
||||
|
||||
export function spellPipeRow(cells: readonly string[]): string {
|
||||
return `| ${cells.join(' | ')} |`
|
||||
export function* pipeRowPieces(cells: readonly string[]): Generator<string> {
|
||||
yield '|'
|
||||
for (const cell of cells) {
|
||||
yield ' '
|
||||
yield cell
|
||||
yield ' |'
|
||||
}
|
||||
}
|
||||
|
||||
function splitPipeCells(line: string, start: number): string[] {
|
||||
|
||||
Reference in New Issue
Block a user