$ printf -- '| | |\n|-----|-----|\n| a | b |\n| c | d |\n'
| | |
|-----|-----|
| a | b |
| c | d |
$ printf -- '| | |\n|-----|-----|\n| a | b |\n| c | d |\n' | cargo run --bin pampa --
[ Table ( "" , [] , [] ) (Caption Nothing []) [(AlignDefault, ColWidthDefault), (AlignDefault, ColWidthDefault)] (TableHead ( "" , [] , [] ) []) [TableBody ( "" , [] , [] ) (RowHeadColumns 0) [] [Row ( "" , [] , [] ) [Cell ( "" , [] , [] ) AlignDefault (RowSpan 1) (ColSpan 1) [Plain [Str "a"]] , Cell ( "" , [] , [] ) AlignDefault (RowSpan 1) (ColSpan 1) [Plain [Str "b"]] ] , Row ( "" , [] , [] ) [Cell ( "" , [] , [] ) AlignDefault (RowSpan 1) (ColSpan 1) [Plain [Str "c"]] , Cell ( "" , [] , [] ) AlignDefault (RowSpan 1) (ColSpan 1) [Plain [Str "d"]] ] ]] (TableFoot ( "" , [] , [] ) [] ) ]
$ printf -- '| | |\n|-----|-----|\n| a | b |\n| c | d |\n' | cargo run --bin pampa -- -t qmd
| a | b |
| --- | --- |
| c | d |
$ printf -- '| | |\n|-----|-----|\n| a | b |\n| c | d |\n' | cargo run --bin pampa -- -t qmd | cargo run --bin pampa --
[ Table ( "" , [] , [] ) (Caption Nothing []) [(AlignDefault, ColWidthDefault), (AlignDefault, ColWidthDefault)] (TableHead ( "" , [] , [] ) [Row ( "" , [] , [] ) [Cell ( "" , [] , [] ) AlignDefault (RowSpan 1) (ColSpan 1) [Plain [Str "a"]] , Cell ( "" , [] , [] ) AlignDefault (RowSpan 1) (ColSpan 1) [Plain [Str "b"]] ] ]) [TableBody ( "" , [] , [] ) (RowHeadColumns 0) [] [Row ( "" , [] , [] ) [Cell ( "" , [] , [] ) AlignDefault (RowSpan 1) (ColSpan 1) [Plain [Str "c"]] , Cell ( "" , [] , [] ) AlignDefault (RowSpan 1) (ColSpan 1) [Plain [Str "d"]] ] ]] (TableFoot ( "" , [] , [] ) [] ) ]
A pipe table whose header row is empty (every header cell blank) is parsed as a
TablewithTableHead [] [](zero header rows). The writer omits the empty header line entirely, emitting the alignment delimiter directly above what was the first body row. The re-parser then reads that body row as the table header, sohead$rowsflips from length 0 to length 1 and the body loses one row.Examples from quarto-web: