diff options
author | Kim Alvefur <zash@zash.se> | 2023-04-07 13:00:58 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2023-04-07 13:00:58 +0200 |
commit | 41be222478be271c0450e37c1060914b266bc24d (patch) | |
tree | ecfe410ba9297649f924e645edab6decacd3b630 | |
parent | 8b33e79fdb3b4f9bc1bb9d634265bcd49c1ad5c2 (diff) | |
download | prosody-41be222478be271c0450e37c1060914b266bc24d.tar.gz prosody-41be222478be271c0450e37c1060914b266bc24d.zip |
util.human.io: Allow defining per column ellipsis function
As an alternative to doing it in the mapper function. Could be useful in
cases where one may want to put the ellipsis in the middle or beginning
instead of the start.
-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 22c2c3ba..b2318c0f 100644 --- a/util/human/io.lua +++ b/util/human/io.lua @@ -176,7 +176,7 @@ local function new_table(col_specs, max_width) v = padright(v, width); end elseif len(v) > width then - v = ellipsis(v, width); + v = (column.ellipsis or ellipsis)(v, width); end table.insert(output, v); end |