Handle 'code' tag in shr.el

* etc/NEWS: Announce change in shr behavior (bug#36247).
* lisp/net/shr.el: Add 'code' tag handling.
This commit is contained in:
Nick Drozd 2019-06-23 14:19:43 +02:00 committed by Lars Ingebrigtsen
parent 55cb14bfa0
commit c4bfb5dfab
2 changed files with 8 additions and 1 deletions

View file

@ -934,6 +934,9 @@ This attribute is meant to tell screen readers to ignore a tag.
---
*** 'shr-tag-ol' now respects the ordered list 'start' attribute.
---
*** The <code ...> tag is now handled.
** Htmlfontify
*** The functions 'hfy-color', 'hfy-color-vals' and

View file

@ -1401,10 +1401,14 @@ ones, in case fg and bg are nil."
(defun shr-tag-u (dom)
(shr-fontize-dom dom 'underline))
(defun shr-tag-tt (dom)
(defun shr-tag-code (dom)
(let ((shr-current-font 'default))
(shr-generic dom)))
(defun shr-tag-tt (dom)
;; The `tt' tag is deprecated in favor of `code'.
(shr-tag-code dom))
(defun shr-tag-ins (cont)
(let* ((start (point))
(color "green")