diff options
| author | Nick Drozd | 2019-06-23 14:19:43 +0200 |
|---|---|---|
| committer | Lars Ingebrigtsen | 2019-06-23 19:07:43 +0200 |
| commit | c4bfb5dfab5699aa63ab65f3274866e5a1376569 (patch) | |
| tree | 2acc32e9c8621e8738ddb7ba578f1d2d9259227c | |
| parent | 55cb14bfa036991183a3895506a87536befbb9ca (diff) | |
| download | emacs-c4bfb5dfab5699aa63ab65f3274866e5a1376569.tar.gz emacs-c4bfb5dfab5699aa63ab65f3274866e5a1376569.zip | |
Handle 'code' tag in shr.el
* etc/NEWS: Announce change in shr behavior (bug#36247).
* lisp/net/shr.el: Add 'code' tag handling.
| -rw-r--r-- | etc/NEWS | 3 | ||||
| -rw-r--r-- | lisp/net/shr.el | 6 |
2 files changed, 8 insertions, 1 deletions
| @@ -934,6 +934,9 @@ This attribute is meant to tell screen readers to ignore a tag. | |||
| 934 | --- | 934 | --- |
| 935 | *** 'shr-tag-ol' now respects the ordered list 'start' attribute. | 935 | *** 'shr-tag-ol' now respects the ordered list 'start' attribute. |
| 936 | 936 | ||
| 937 | --- | ||
| 938 | *** The <code ...> tag is now handled. | ||
| 939 | |||
| 937 | ** Htmlfontify | 940 | ** Htmlfontify |
| 938 | 941 | ||
| 939 | *** The functions 'hfy-color', 'hfy-color-vals' and | 942 | *** 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." | |||
| 1401 | (defun shr-tag-u (dom) | 1401 | (defun shr-tag-u (dom) |
| 1402 | (shr-fontize-dom dom 'underline)) | 1402 | (shr-fontize-dom dom 'underline)) |
| 1403 | 1403 | ||
| 1404 | (defun shr-tag-tt (dom) | 1404 | (defun shr-tag-code (dom) |
| 1405 | (let ((shr-current-font 'default)) | 1405 | (let ((shr-current-font 'default)) |
| 1406 | (shr-generic dom))) | 1406 | (shr-generic dom))) |
| 1407 | 1407 | ||
| 1408 | (defun shr-tag-tt (dom) | ||
| 1409 | ;; The `tt' tag is deprecated in favor of `code'. | ||
| 1410 | (shr-tag-code dom)) | ||
| 1411 | |||
| 1408 | (defun shr-tag-ins (cont) | 1412 | (defun shr-tag-ins (cont) |
| 1409 | (let* ((start (point)) | 1413 | (let* ((start (point)) |
| 1410 | (color "green") | 1414 | (color "green") |