mirror of
https://github.com/larvit/adf-codec.git
synced 2026-11-18 22:25:44 +01:00
Answer architecture round 5: the builders keep main's spelling, each writer's result and the CommonMark ask's spelling are held to the bound once built, and the engines' own overflows refuse alike
This commit is contained in:
@@ -36,17 +36,12 @@ export function pipeCells(line: string): string[] | undefined {
|
||||
return claimsPipeLine(line) ? splitPipeCells(line, 1) : undefined
|
||||
}
|
||||
|
||||
export function delimiterCells(columns: number): string[] {
|
||||
return Array.from({ length: columns }, () => '---')
|
||||
export function spellPipeDelimiter(columns: number): string {
|
||||
return spellPipeRow(Array.from({ length: columns }, () => '---'))
|
||||
}
|
||||
|
||||
export function* pipeRowPieces(cells: readonly string[]): Generator<string> {
|
||||
yield '|'
|
||||
for (const cell of cells) {
|
||||
yield ' '
|
||||
yield cell
|
||||
yield ' |'
|
||||
}
|
||||
export function spellPipeRow(cells: readonly string[]): string {
|
||||
return `| ${cells.join(' | ')} |`
|
||||
}
|
||||
|
||||
function splitPipeCells(line: string, start: number): string[] {
|
||||
|
||||
Reference in New Issue
Block a user