about summary refs log tree commit homepage
path: root/lib/PublicInbox/LeiOverview.pm
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2021-03-20 19:04:05 +0900
committerEric Wong <e@80x24.org>2021-03-21 09:45:48 +0000
commitbcf5a733206b14f82cc151c702fd554cd08481ff (patch)
tree4963c40a5fa0fc51ce20bd89605d70c96d1f533f /lib/PublicInbox/LeiOverview.pm
parentb6829bbfd86f5d22a8ffb80fd7bfe59299fe6b55 (diff)
downloadpublic-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.pm5
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) . ']';