Fix table.jq to use correct index in to_line function

This commit is contained in:
Chris Kruining 2026-02-17 15:39:36 +01:00
parent fca97a534e
commit 10a1a324ce
No known key found for this signature in database
GPG key ID: EB894A3560CCCAD2

View file

@ -24,7 +24,7 @@ def to_cells(sizes; fn):
def to_cells(sizes): to_cells(sizes; null); def to_cells(sizes): to_cells(sizes; null);
def to_line(left; joiner; right): def to_line(left; joiner; right):
[left, .[1], (.[1:] | map([joiner, .]) ), right] | flatten | join(""); [left, .[0], (.[1:] | map([joiner, .]) ), right] | flatten | join("");
def create(data; header_callback; cell_callback): def create(data; header_callback; cell_callback):
(data[0] | to_entries | map(.key)) as $keys (data[0] | to_entries | map(.key)) as $keys