diff options
Diffstat (limited to 'lisp/mastodon-tl.el')
| -rw-r--r-- | lisp/mastodon-tl.el | 11 | 
1 files changed, 7 insertions, 4 deletions
| diff --git a/lisp/mastodon-tl.el b/lisp/mastodon-tl.el index de65344..b873991 100644 --- a/lisp/mastodon-tl.el +++ b/lisp/mastodon-tl.el @@ -507,6 +507,10 @@ LINK-TYPE is the type of link to produce."    (let ((spoiler (mastodon-tl--field 'spoiler_text toot)))      (and spoiler (> (length spoiler) 0)))) +(defun mastodon-tl--clean-tabs-and-nl (string) +  (replace-regexp-in-string +   "[\t\n ]*\\'" "" string)) +  (defun mastodon-tl--spoiler (toot)    "Render TOOT with spoiler message. @@ -517,8 +521,8 @@ message is a link which unhides/hides the main body."    (let* ((spoiler (mastodon-tl--field 'spoiler_text toot))           (string (mastodon-tl--set-face                    ;; remove trailing whitespace -                  (replace-regexp-in-string "[\t\n ]*\\'" "" -                                            (mastodon-tl--render-text spoiler toot)) +                  (mastodon-tl--clean-tabs-and-nl +                   (mastodon-tl--render-text spoiler toot))                    'default))           (message (concat "\n"                            " ---------------\n" @@ -580,8 +584,7 @@ it is `mastodon-tl--byline-boosted'"    "Formats TOOT and insertes it into the buffer."    (mastodon-tl--insert-status     toot -   (replace-regexp-in-string -    "[\t\n ]*\\'" "" +   (mastodon-tl--clean-tabs-and-nl      (if (mastodon-tl--has-spoiler toot)          (mastodon-tl--spoiler toot)        (mastodon-tl--content toot))) | 
