diff options
author | Kim Alvefur <zash@zash.se> | 2023-04-07 13:02:20 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2023-04-07 13:02:20 +0200 |
commit | 08c055709347b78e2fad5621dac247aa4a794fde (patch) | |
tree | 92b683498f988440a4a9110d848f8469a4d6e2f6 /util | |
parent | 41be222478be271c0450e37c1060914b266bc24d (diff) | |
download | prosody-08c055709347b78e2fad5621dac247aa4a794fde.tar.gz prosody-08c055709347b78e2fad5621dac247aa4a794fde.zip |
util.human.io: Pass the whole column definition to mapper function
I forget why I wanted this, but it may allow doing things like pull
settings from the column, especially when the mapper function is reused
among many columns.
Diffstat (limited to 'util')
-rw-r--r-- | util/human/io.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/util/human/io.lua b/util/human/io.lua index b2318c0f..bfbabafb 100644 --- a/util/human/io.lua +++ b/util/human/io.lua @@ -162,7 +162,7 @@ local function new_table(col_specs, max_width) local width = widths[i]; local v = row[not titles and column.key or i]; if not titles and column.mapper then - v = column.mapper(v, row, width); + v = column.mapper(v, row, width, column); end if v == nil then v = column.default or ""; |