Answer the stability pass: the strip that changed nothing, and the words the body earns
CI / gate (push) Successful in 8s

This commit is contained in:
2026-09-01 19:13:13 +02:00
parent aae1ed4baf
commit e68dbc41a3
8 changed files with 19 additions and 16 deletions
+5 -6
View File
@@ -19,22 +19,21 @@ export function malformedPipeTable(message: string): ConvertFault {
// spec/flavour.md, Tables: the cells of a claimed row, the closing `|` the spelling writes optional here.
export function pipeCells(line: string): string[] | undefined {
if (!claimsPipeLine(line)) return undefined
const row = line.replace(/[ \t]+$/, '')
const cells: string[] = []
let start = 1
let index = 1
while (index < row.length) {
if (backslashEscape(row, index) !== undefined) {
while (index < line.length) {
if (backslashEscape(line, index) !== undefined) {
index += 2
continue
}
if (row.charAt(index) === '|') {
cells.push(trimSpace(row.slice(start, index)))
if (line.charAt(index) === '|') {
cells.push(trimSpace(line.slice(start, index)))
start = index + 1
}
index += 1
}
cells.push(trimSpace(row.slice(start)))
cells.push(trimSpace(line.slice(start)))
if (cells.length > 1 && cells.at(-1) === '') cells.pop()
return cells
}