fix(details): flatten key-values, remove keywords

This commit is contained in:
contrapunctus 2021-07-03 06:19:27 +05:30
parent 1931e88c85
commit 7976b53d91
2 changed files with 10 additions and 6 deletions

View File

@ -2029,9 +2029,11 @@ LIST is either tags (a list of symbols) or a plist."
(if (and contents custom) (if (and contents custom)
(pcase custom (pcase custom
((pred stringp) ((pred stringp)
(mapconcat (--> (flatten-list contents)
(lambda (elt) (format custom elt)) (seq-remove #'keywordp it)
contents " ")) (mapconcat
(lambda (elt) (format custom elt))
it ", ")))
((pred functionp) ((pred functionp)
(funcall custom list))) (funcall custom list)))
""))) "")))

View File

@ -3234,9 +3234,11 @@ LIST is either tags (a list of symbols) or a plist."
(if (and contents custom) (if (and contents custom)
(pcase custom (pcase custom
((pred stringp) ((pred stringp)
(mapconcat (--> (flatten-list contents)
(lambda (elt) (format custom elt)) (seq-remove #'keywordp it)
contents " ")) (mapconcat
(lambda (elt) (format custom elt))
it ", ")))
((pred functionp) ((pred functionp)
(funcall custom list))) (funcall custom list)))
""))) "")))