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)
(pcase custom
((pred stringp)
(mapconcat
(lambda (elt) (format custom elt))
contents " "))
(--> (flatten-list contents)
(seq-remove #'keywordp it)
(mapconcat
(lambda (elt) (format custom elt))
it ", ")))
((pred functionp)
(funcall custom list)))
"")))

View File

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