aboutsummaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authormarty hiatt <martianhiatus [a t] riseup [d o t] net>2022-10-29 12:20:04 +0200
committermarty hiatt <martianhiatus [a t] riseup [d o t] net>2022-10-29 12:20:04 +0200
commit0b7c807612e64fbdb539c39399a1301f3de374ce (patch)
tree8a6c5c65816206606dbff66c88efb3a98f76030a /lisp
parente07ccef99359230a88b33360e1a5657a6bf49b33 (diff)
t = yes, :json-false = no, in instance description display
Diffstat (limited to 'lisp')
-rw-r--r--lisp/mastodon-tl.el29
1 files changed, 18 insertions, 11 deletions
diff --git a/lisp/mastodon-tl.el b/lisp/mastodon-tl.el
index 158ba5f..ce5d745 100644
--- a/lisp/mastodon-tl.el
+++ b/lisp/mastodon-tl.el
@@ -1498,17 +1498,24 @@ IND is the optional indentation level to print at."
(mastodon-tl--print-json-keys
(cdr el) (if ind (+ ind 4) 4)))
(t
- (when ind (indent-to ind))
- (insert (mastodon-tl--format-key el pad)
- " "
- (mastodon-tl--newline-if-long el)
- ;; only send strings straight to --render-text
- ;; this makes hyperlinks work:
- (if (not (stringp (cdr el)))
- (mastodon-tl--render-text
- (prin1-to-string (cdr el)))
- (mastodon-tl--render-text (cdr el)))
- "\n")))))))
+ ;; basic handling of raw booleans:
+ (let ((val (cond ((equal (cdr el) ':json-false)
+ "no")
+ ((equal (cdr el) 't)
+ "yes")
+ (t
+ (cdr el)))))
+ (when ind (indent-to ind))
+ (insert (mastodon-tl--format-key el pad)
+ " "
+ (mastodon-tl--newline-if-long el)
+ ;; only send strings straight to --render-text
+ ;; this makes hyperlinks work:
+ (if (not (stringp val))
+ (mastodon-tl--render-text
+ (prin1-to-string val))
+ (mastodon-tl--render-text val))
+ "\n"))))))))
(defun mastodon-tl--print-instance-rules-or-fields (alist)
"Print ALIST of instance rules or contact account fields."