mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-12-14 09:39:42 +00:00
Add support for <mark> in shr
* lisp/net/shr.el (shr-mark): New face (bug#48211). (shr-tag-mark): New function
This commit is contained in:
parent
3a4c408a7b
commit
474f5b21b4
@ -232,6 +232,11 @@ temporarily blinks with this face."
|
||||
"Face used for rendering <code> blocks."
|
||||
:version "29.1")
|
||||
|
||||
(defface shr-mark
|
||||
'((t :background "yellow" :foreground "black"))
|
||||
"Face used for <mark> elements."
|
||||
:version "29.1")
|
||||
|
||||
(defcustom shr-inhibit-images nil
|
||||
"If non-nil, inhibit loading images."
|
||||
:version "28.1"
|
||||
@ -1422,6 +1427,14 @@ ones, in case fg and bg are nil."
|
||||
;; The `tt' tag is deprecated in favor of `code'.
|
||||
(shr-tag-code dom))
|
||||
|
||||
(defun shr-tag-mark (dom)
|
||||
(when (and (not (bobp))
|
||||
(not (= (char-after (1- (point))) ?\s)))
|
||||
(insert " "))
|
||||
(let ((start (point)))
|
||||
(shr-generic dom)
|
||||
(shr-add-font start (point) 'shr-mark)))
|
||||
|
||||
(defun shr-tag-ins (cont)
|
||||
(let* ((start (point))
|
||||
(color "green")
|
||||
|
Loading…
Reference in New Issue
Block a user