Software /
code /
prosody
Changeset
13040:0cbe400ebab4
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.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Fri, 07 Apr 2023 13:02:20 +0200 |
parents | 13039:9ddb344b9fab |
children | 13041:61b00bd20074 |
files | util/human/io.lua |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/util/human/io.lua Fri Apr 07 13:00:58 2023 +0200 +++ b/util/human/io.lua Fri Apr 07 13:02:20 2023 +0200 @@ -162,7 +162,7 @@ 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 "";