aboutsummaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorJohnson Denen <johnson.denen@gmail.com>2017-04-19 22:29:32 -0400
committerJohnson Denen <johnson.denen@gmail.com>2017-04-19 22:29:32 -0400
commit7f9fae9eca114bc2981112795831dbd8f3e1f78c (patch)
treee3cda507d97b5a4f51ef431c4cf35907554f3541 /lisp
parent20f5b32b17afa33441b0ca5d2d5c54a254a2e565 (diff)
Render html with shr instead of html2text
Diffstat (limited to 'lisp')
-rw-r--r--lisp/mastodon-tl.el8
-rw-r--r--lisp/mastodon-toot.el1
-rw-r--r--lisp/mastodon.el1
3 files changed, 5 insertions, 5 deletions
diff --git a/lisp/mastodon-tl.el b/lisp/mastodon-tl.el
index e25f1d4..6c9b4e5 100644
--- a/lisp/mastodon-tl.el
+++ b/lisp/mastodon-tl.el
@@ -133,7 +133,10 @@ Return value from boosted content if available."
(defun mastodon-tl--content (toot)
"Retrieve text content from TOOT."
(let ((content (mastodon-tl--field 'content toot)))
- (propertize (mastodon-tl--remove-html content)
+ (propertize (with-temp-buffer
+ (insert content)
+ (shr-render-region (point-min) (point-max))
+ (buffer-string))
'face 'default)))
(defun mastodon-tl--toot (toot)
@@ -145,8 +148,7 @@ Return value from boosted content if available."
(defun mastodon-tl--timeline (toots)
(mapcar 'mastodon-tl--toot toots)
- (html2text)
- (replace-regexp "\n\n\n" "\n" nil (point-min) (point-max)))
+ (replace-regexp "\n\n\n | " "\n | " nil (point-min) (point-max)))
;; TODO
;; Look into the JSON returned here by Local
diff --git a/lisp/mastodon-toot.el b/lisp/mastodon-toot.el
index fc06e66..93980f0 100644
--- a/lisp/mastodon-toot.el
+++ b/lisp/mastodon-toot.el
@@ -70,7 +70,6 @@ STATUS is passed by `url-retrieve'."
(defun mastodon-toot--action-success (marker)
"Insert MARKER with 'success face in byline."
(let ((inhibit-read-only t))
- (goto-char (+ 3 (point)))
(insert (format "(%s) "
(propertize marker 'face 'success)))
(mastodon-tl--goto-prev-toot)))
diff --git a/lisp/mastodon.el b/lisp/mastodon.el
index 8abdb43..f96b5e3 100644
--- a/lisp/mastodon.el
+++ b/lisp/mastodon.el
@@ -62,7 +62,6 @@
:options '(provide-discover-context-menu)
:group 'mastodon)
-;; FIXME #25
(defun mastodon-version ()
"Message package version."
(interactive)