diff options
author | Eric Wong <e@80x24.org> | 2021-03-20 19:04:05 +0900 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2021-03-21 09:45:48 +0000 |
commit | bcf5a733206b14f82cc151c702fd554cd08481ff (patch) | |
tree | 4963c40a5fa0fc51ce20bd89605d70c96d1f533f /lib/PublicInbox/LeiOverview.pm | |
parent | b6829bbfd86f5d22a8ffb80fd7bfe59299fe6b55 (diff) | |
download | public-inbox-bcf5a733206b14f82cc151c702fd554cd08481ff.tar.gz |
Don't waste precious terminal space when there are only a small number of possible keywords supported/reserved for JMAP. In the future, we may implement more sophisticated wrapping for labels, but it we'll cross tha bridge when we come to it.
Diffstat (limited to 'lib/PublicInbox/LeiOverview.pm')
-rw-r--r-- | lib/PublicInbox/LeiOverview.pm | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/PublicInbox/LeiOverview.pm b/lib/PublicInbox/LeiOverview.pm index 48237f8a..521bca50 100644 --- a/lib/PublicInbox/LeiOverview.pm +++ b/lib/PublicInbox/LeiOverview.pm @@ -176,7 +176,10 @@ sub _json_pretty { $pair =~ s/(null|"),"/$1, "/g; $pair; } @$v) . ']'; - } else { # references + } elsif ($k eq 'kw') { # keywords are short, one-line + $v = $json->encode($v); + $v =~ s/","/", "/g; + } else { # refs, labels, ... $v = '[' . join($sep, map { substr($json->encode([$_]), 1, -1); } @$v) . ']'; |