[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
emacs-28 610680a: Fix rendering of title-less <abbr> tags in shr
From: |
Lars Ingebrigtsen |
Subject: |
emacs-28 610680a: Fix rendering of title-less <abbr> tags in shr |
Date: |
Sun, 31 Oct 2021 11:20:23 -0400 (EDT) |
branch: emacs-28
commit 610680a8d38f3895e8e39caf60c2d937d9d33d8e
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>
Fix rendering of title-less <abbr> tags in shr
* lisp/net/shr.el (shr-tag-abbr): Render <abbr> tags that have no
title (bug#51525).
---
lisp/net/shr.el | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/lisp/net/shr.el b/lisp/net/shr.el
index a8e15c1..f33272f 100644
--- a/lisp/net/shr.el
+++ b/lisp/net/shr.el
@@ -1574,15 +1574,14 @@ ones, in case fg and bg are nil."
(shr-urlify (or shr-start start) (shr-expand-url url) title))))
(defun shr-tag-abbr (dom)
- (when-let* ((title (dom-attr dom 'title))
- (start (point)))
+ (let ((title (dom-attr dom 'title))
+ (start (point)))
(shr-generic dom)
(shr-add-font start (point) 'shr-abbreviation)
- (add-text-properties
- start (point)
- (list
- 'help-echo title
- 'mouse-face 'highlight))))
+ (when title
+ (add-text-properties start (point)
+ (list 'help-echo title
+ 'mouse-face 'highlight)))))
(defun shr-tag-acronym (dom)
;; `acronym' is deprecated in favor of `abbr'.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- emacs-28 610680a: Fix rendering of title-less <abbr> tags in shr,
Lars Ingebrigtsen <=