branch: elpa/fj
commit 1aa74c9f5c454df2c02799d56ed29cbb4d0fbe1d
Author: marty hiatt <[email protected]>
Commit: marty hiatt <[email protected]>
add props to comment attachments. #216.
---
fj.el | 23 ++++++++++++++---------
1 file changed, 14 insertions(+), 9 deletions(-)
diff --git a/fj.el b/fj.el
index 2e77487868..58d32b852d 100644
--- a/fj.el
+++ b/fj.el
@@ -2888,15 +2888,20 @@ works on the resulting html."
(concat
"\nš " (substring fedi-horiz-bar 3)
(propertize
- ;; FIXME: markdown rendering adds an unwanted newline, and stripping
- ;; it still renders with an empty line!
- (fj-render-markdown
- (mapconcat (lambda (x)
- (concat
- "[" (alist-get 'name x) "]("
- (alist-get 'browser_download_url x)
- ")"))
- assets "\n"))
+ (mapconcat (lambda (x)
+ (propertize
+ ;; FIXME: markdown rendering adds an unwanted newline,
+ ;; and stripping it still renders with an empty line! we
+ ;; need to render each attachment separately so we can
+ ;; then propertize it with its data
+ (fj-render-markdown
+ (concat
+ "[" (alist-get 'name x) "]("
+ (alist-get 'browser_download_url x)
+ ")"))
+ 'fj-attachment x
+ 'fj-attachment-id (alist-get 'id x)))
+ assets "\n")
'fj-item-body t)))
(defun fj-item-view (&optional repo owner number type page limit)