Changeset

11893:afef1e170de7

util.human.io: Support specifying column defaults in tables
author Kim Alvefur <zash@zash.se>
date Fri, 12 Nov 2021 11:44:31 +0100
parents 11892:e712133b4de1
children 11894:57106c61d104
files util/human/io.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/util/human/io.lua	Fri Nov 12 11:43:24 2021 +0100
+++ b/util/human/io.lua	Fri Nov 12 11:44:31 2021 +0100
@@ -136,7 +136,7 @@
 				v = column.mapper(v, row);
 			end
 			if v == nil then
-				v = "";
+				v = column.default or "";
 			else
 				v = tostring(v);
 			end