From c4bfb5dfab5699aa63ab65f3274866e5a1376569 Mon Sep 17 00:00:00 2001 From: Nick Drozd Date: Sun, 23 Jun 2019 14:19:43 +0200 Subject: [PATCH] Handle 'code' tag in shr.el * etc/NEWS: Announce change in shr behavior (bug#36247). * lisp/net/shr.el: Add 'code' tag handling. --- etc/NEWS | 3 +++ lisp/net/shr.el | 6 +++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/etc/NEWS b/etc/NEWS index 0cfac248a32..58d4727ee7e 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -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 tag is now handled. + ** Htmlfontify *** The functions 'hfy-color', 'hfy-color-vals' and diff --git a/lisp/net/shr.el b/lisp/net/shr.el index a014c56948c..7fdb3212d49 100644 --- a/lisp/net/shr.el +++ b/lisp/net/shr.el @@ -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") -- 2.39.5