Skip to content

Commit

Permalink
Merge pull request #127 from clj-commons/hls/20240822-125-table-broken
Browse files Browse the repository at this point in the history
Correctly output table cells when the column :key is a function, not a keyword
  • Loading branch information
hlship authored Aug 22, 2024
2 parents 99d118b + 3011402 commit 0e24034
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/clj_commons/format/table.clj
Original file line number Diff line number Diff line change
Expand Up @@ -207,14 +207,14 @@
(pcompose
row-left
(for [{:keys [width key decorator last? pad]} columns'
:let [value (get row key)
:let [value (key row)
decorator' (or decorator default-decorator)
font (when decorator'
(decorator' row-index value))]]
(list [{:font font
:pad (or pad (if last? :right :left))
:width width}
(get row key)]
value]
(when-not last?
row-sep)))
row-right
Expand All @@ -230,3 +230,4 @@
(when-not last?
(print footer-sep)))
(println footer-right))))

0 comments on commit 0e24034

Please sign in to comment.